Examining some strange behaviour of a script I read following in the remarks of the enterLong-etc-page in the manual:
reverseLong/Short are helper functions ... If Stop, TakeProfit, or ExitTime is used, open trades in the same direction are updated with the new stop loss and take profit values ...
Unlike enterLong/Short Stop and TakeProfit seem to influence also open trades. If I have:
int TMF() {
// modify Stop/Takeprofit if some conditions are met
}
function run() {
...
Stop = 250 * PIP;
TakeProfit = 550 * PIP;
...
reverseLong(1, TMF);
...
reverseShort(1, TMF);
}
Will Stop and TakeProfit be (re)set to the values from the run function (250/550 * PIP) each run if not modified by the TMF?