int CancelOtherTrades = 0;
int MyTMF()
{
if(TradeIsPending and CancelOtherTrades == 1)
return 1;
if(TradeIsOpen) {
CancelOtherTrades = 1;
ThisTrade->manage = 0; // terminate the TMF
}
return 0;
}
function run()
{
NumWFOCycles = 3;
Spread = 1;
BarPeriod = 60;
set(TICKS|LOGFILE);
var Price = priceClose();
if (hour() >= 8 && hour() < 9 && MyTMF() == 0){
Stop = Price + 51*PIP;
TakeProfit = Price + 1;
printf("Price = %.f",Price);
enterShort(2,-15*PIP);
enterShort(1,-20*PIP);
enterShort(1,-25*PIP);
Stop = Price - 50*PIP;
TakeProfit = Price;
enterLong(2,-14*PIP);
enterLong(1,-19*PIP);
enterLong(1,-24*PIP);
}
}