use some print() or alert() to c where the problem is
qjol:
use some print() or alert() to c where the problem is
Thank you very much,
extern double TakeProfit =1000; extern double StopLoss =500; OrderClose(OrderTicket(),OrderLots(),Bid,3,White); // or OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),3,White);
These lead me to believe you're on a 5 digit broker, therefor TP, SL, and Slippage must be adjusted:
//++++ 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
WHRoeder:
These lead me to believe you're on a 5 digit broker, therefor TP, SL, and Slippage must be adjusted:
These lead me to believe you're on a 5 digit broker, therefor TP, SL, and Slippage must be adjusted:
Thank you very much,Sir, I'm on a 5 digit broker,I'll study your code,and I have not find out where is wrong yet.
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
I write a cross trendline ea, it can open a order but can not close it, I wondered what's wrong in it. please help me about.