Posted By: oligodar
Negative values in exitLong() - 12/15/13 14:38
Code:
TRADE* reverseLong(int MaxTrades) { // update the stops and profit targets of open trades if(Stop > 0) exitLong(0,priceClose()-Stop); if(TakeProfit > 0) exitLong(0,-(priceClose()+TakeProfit)); // if MaxTrades is not reached, open a new trade if(NumOpenLong < MaxTrades or Train) trade = enterLong(); // otherwise, close opposite trades if not hedging else if(Hedge <= 1) exitShort(); return 0; }
Hi, could sb explain me this line from tutorial:
exitLong(0,-(priceClose()+TakeProfit));
For example:
price close is: 100
take profit is: 10
So it would be:
exitLong(0,-110);
How could be price for exiting long trades negative?
Thank you