Quote:
|
Originally Posted by sentaco
Thx holyguy
But the TakeProfit option DONT work. I have changed it to 3 pips but still making orders with TP 22 pips...
I think u have to edit V1a to can make Maxorders... Maxopenorders...
PLs fix that
|
The TakeProfit in the version c is overwritten by following code:
double value = iATR(NULL,PERIOD_D1,21,0);
if(Point == 0.01) value = value*100;
if(Point == 0.0001) value = value*10000;
TakeProfit = value*2/10;
Stoploss = value*2;
PipStep = value/10;
So you could not specify it.
Furthermore, it was found that the daily average true range iATR sometimes (or often) returns value of 0. But I do not understand why its value could be zero. I saw such problem from both IBFX and NF. This will cause a failure in OrderSend. You may see there may be no trades when it should be. No error will be reported unless you add error checking code to the FB.
To avoid this problem, following change may be made:
if (value != 0 )
{
TakeProfit = value*2/10;
Stoploss = value*2;
PipStep = value/10;
}