4ng3l:
hi i wrote this code but it return -1 ...
please help me ...
i think it's supposed to be
fran=OrderSend(Symbol(),OP_SELLSTOP,LOTSIZE,Bid-100*Point,Slippage,Bid+200*Point,Bid-200*Point,"My Sell Position",60*60*24*2,0,Red); Comment("Position AT : ",fran);
thanks dude, its awesome ....
For the future - note StopLevel ( MarketInfo( Symbol(), MODE_STOPLEVEL ) ) value when you open the position or place pending order. It will save some nerves.
In the Bid-10, and ask+20 those are pips. You had to change them to 100 and 200 because you're using a five digit broker. Instead, the EA should have adjusted them.
//++++ These are adjusted for 5 digit brokers. double pips2points, // slippage 3 pips 3=points 30=points pips2dbl; // Stoploss 15 pips 0.0015 0.00150 int Digits.pips; // DoubleToStr(dbl/pips2dbl, Digits.pips) int init(){ if (Digits == 5 || Digits == 3){ // Adjust for five (5) digit brokers. pips2dbl = Point*10; pips2points = 10; Digits.pips = 1; } else { pips2dbl = Point; pips2points = 1; Digits.pips = 0; } // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hi i wrote this code but it return -1 ...
please help me ...