Could someone please help me with the attached pending order script?
I found it on FF, and modified it so that it places a pending buy order X pips above the current candle, with a stop X pips below the current candle.
It works fine, but I get an error if I set it to buy 10 pips above the current candle on the XTIUSD pair. 9 pips works fine, but 10 pips gives the attached error:
order send failed with error(4107): invalid price parameter for trade function
Lines 28 & 29:
The strange thing is that for currency pairs, I can increase this above 9 pips and it works fine.
Can anyone help please?
I found it on FF, and modified it so that it places a pending buy order X pips above the current candle, with a stop X pips below the current candle.
It works fine, but I get an error if I set it to buy 10 pips above the current candle on the XTIUSD pair. 9 pips works fine, but 10 pips gives the attached error:
order send failed with error(4107): invalid price parameter for trade function
Lines 28 & 29:
Inserted Code
extern int AddToHighPips=9; extern int SubtractFromLowPips=9;
The strange thing is that for currency pairs, I can increase this above 9 pips and it works fine.
Can anyone help please?
Attached File(s)
Oil - 5pipBuyCurr.mq4
16 KB
|
283 downloads