|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
|
|
LinkBack | Thread Tools |
|
|
|||
|
|||
|
Someone PLEASE code these from TS for me...
Hi,
Can anyone please code the following indicators for me? They are written in TradeStation's (not)Easylanguage. if you have trouble then PM/email me i know it's a LOT of work but will be well worth it once whomever codes it knows what method it is... SB |
|
|
|||
|
|||
|
Before any one takes up that task, can you explain what the strategies are and give some details, url references for them. If it is an winning strategy, then someone will take up the challenge. Otherwise, why would anyone spend their time translating.
Thanks, |
|
|
|||
|
|||
|
I'm trying to write a piece of code that will modify the TP of allexisting trades. When I attach the code to a chart, it works only for the currency where the expert is attached. It does not modify other trades from other currency pairs. Please note that I'm not checking the OrderSymbol()==Symbol() in my code. Where is the mistake? Do I have to add a "return(0)" after each OrderModify()? Can you help me?
Does the expert allow me to open/close/modify trades of a different currency pair while the expert is attached only to a single chart? I'm trying to write a universal code that will process (ie, either modify or close) all existing trades regardless of the chart where the EA is attached to. Can someone please confirm if this is possible at all? If yes, then what is wrong with the following code? int mTrades=OrdersTotal(); if (mTrades>0) { for (i=0;i<mTrades;i++) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if (OrderType() == OP_BUY) { OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), Ask+100*Point, White); } if (OrderType() == OP_SELL) { OrderModify(OrderTicket(), OrderOpenPrice(), OrderStopLoss(), Bid-100*Point, White); } } } |
|
|
||||
|
||||
|
Quote:
Try to use : MarketInfo(OrderSymbol(),MODE_BID) and MarketInfo(OrderSymbol(),MODE_ASK) instead |
|
|
|||
|
|||
|
Question About Unusual But Effective Indicator: Wich Lines Of Code Are Causing This?
I AM WRITING AND INDICATOR IN MQL4 THAT MEASURES THE BANDWIDTH BETWEEN UPPER AND LOWER BOLLINGER BANDS... FOR SOME REASON WHEN INSTALLED IN THE TRADING TERMINAL NO LINE IS PLOTTED IN THE INDICATOR WINDOW!... I KNOW THE MATH IS WORKING AS THE CORRECT VALUE OF BANDWIDTH IS DISPLAYED IN THE UPPER LEFT-HAND CORNER OF THE INDICATOR WINDOW AS THE PRICE CHANGES. WHY MIGHT THIS BE HAPPENING? I SUSPECT THERE IS SOME SIMPLE THING WRONG WITH MY CODE AS I ONLY BEGAN LEARNING TO PROGRAM 3 DAYS AGO. ANY HELP WOULD BE GREAT!... WHAT LINES OF CODE NEED TO BE ALTERED?
THANKS, RYAN //+------------------------------------------------------------------+ //| Band Width of Bollinger Bands .mq4 | //| Copyright © 2006, Ghostrider Capital LLC. | //| ryanjmcgregor@tds.net | //+------------------------------------------------------------------+ #property copyright "Copyright © 2006, Ghostrider Capital LLC." #property link "ryanjmcgregor@tds.net" #property indicator_separate_window #property indicator_buffers 4 #property indicator_color1 DodgerBlue #property indicator_maximum 1.5 #property indicator_minimum -0.5 //---- indicator parameters extern int BandsPeriod=20; extern int BandsShift=0; extern double BandsDeviations=2.0; //---- buffers //---- Moving, Upper, and Lower are for counting to draw Band Width 20 double BandWidth20Buffer[]; double MovingBuffer[]; double UpperBuffer[]; double LowerBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,2,DodgerBlue ); SetIndexBuffer(0,BandWidth20Buffer); SetIndexLabel(0,"Band Width 20"); SetIndexBuffer(1,MovingBuffer); SetIndexBuffer(2,UpperBuffer); SetIndexBuffer(3,LowerBuffer); //---- //---- 4 Indicators Buffers Mapping SetIndexDrawBegin(0,0); // SetIndexDrawBegin(1,BandsPeriod+BandsShift); // SetIndexDrawBegin(2,BandsPeriod+BandsShift); // SetIndexDrawBegin(3,BandsPeriod+BandsShift); IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+2 ); IndicatorShortName("Band Width of 20 2.0 BB"); //---- return(0); } //+------------------------------------------------------------------+ //| Bollinger Bands | //+------------------------------------------------------------------+ int start() { int i,k,counted_bars=IndicatorCounted(); double deviation; double sum,oldval,newres,upper,lower,middle; //---- if(Bars<=BandsPeriod) return(0); //---- initial zero if(counted_bars<1) for(i=1;i<=BandsPeriod;i++) { MovingBuffer[Bars-i]=EMPTY_VALUE; UpperBuffer[Bars-i]=EMPTY_VALUE; LowerBuffer[Bars-i]=EMPTY_VALUE; BandWidth20Buffer[Bars-i]=EMPTY_VALUE; } //---- int limit=Bars-counted_bars; if(counted_bars>0) limit++; for(i=0; i<limit; i++) MovingBuffer[i]=iMA(NULL,0,BandsPeriod,BandsShift,MODE_SMA,PRICE_ CLOSE,i); middle=MovingBuffer[i]; //---- i=Bars-BandsPeriod+1; if(counted_bars>BandsPeriod-1) i=Bars-counted_bars-1; while(i>=0) { sum=0.0; k=i+BandsPeriod-1; oldval=MovingBuffer[i]; while(k>=i) { newres=Close[k]-oldval; sum+=newres*newres; k--; } deviation=BandsDeviations*MathSqrt(sum/BandsPeriod); UpperBuffer[i]=oldval+deviation; LowerBuffer[i]=oldval-deviation; upper=UpperBuffer[i]; lower=LowerBuffer[i]; //---- Formula Band Width = (Upper - Lower) / Middle Band moving sma BandWidth20 Buffer[i]=(upper-lower)/middle; i--; } //---- return(0); } //+------------------------------------------------------------------+ |
| Thread Tools | |
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to code this? | iscuba11 | Metatrader 4 mql 4 - Development course | 1 | 08-03-2007 04:22 PM |