techinvest:
Or 1.30050 for a 5 digit broker
That would yield 1.3050 instead of the 51.3000 example.
Viffer:
Or 1.30050 for a 5 digit broker
Or 1.30050 for a 5 digit broker
True.
If it's a 5 digit broker you could either change 50 to 500 or use (Close[1] < Close[5] + AddPips*Point*10)
Sorry Viffer and techinvest for not getting back to you.
I haven't got a mail that you two had answered my question even though i have subscribed to this topic. Strange!!
Never the less i have done it the way you have described and it works perfect.
Thanks!
techinvest:
That won't work on a 5 digit brokerIt's because you're adding 50 to the price and not 50 pips. Ex if the EURUSD is @ 1.3000 when you add 50 to it it becomes 51.3000.
Try using this instead:
(Close[1] < Close[5] + AddPips*Point)
That would yield 1.3050 instead of the 51.3000 example.
//++++ 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
Hello,
I have one line i my EA that looks like this:
if (Close[1] < Close[5]) then something
I want to add 50pips to Close[5] so i did this:
extern int AddPips = 50;
if (Close[1] < Close[5] + AddPips), but it doesn't work.
What am i doin wrong ?
Thanks for your reply in advance.