SubtractFromLow is a doubles converter for for the int SubtractFromLowPips , and is set in init(). An integer divided by factor results in zero, which is why the int needs converting.fx8000 wrote:The sell script is giving rise to error (4107) : invalid price parameter for trade function.
This may be caused by the sell script
price = xxx - SubtractFromLow - xxx, instead of price = xxx - SubtractFromLowPips - xxx,
because the code failed to make a call to extern int SubtractFromLowPips = xxx ?
A typo error ?
The buy script works just fine.
pete
I present users with integer inputs that the code then converts, so they will enter pips as pips and not be bugged by the x digit bollocks.