Hello
Does anyone know where I would go to get the below easy code changed to pro real code? (TDOM is a separate function already coded)
If month(date) = 12 then begin
If TDOM = 15 then buy 2 contracts next bar open;
end;
If openpositionprofit > 0 then sell all contracts next bar open; // First Profitable Opening
If barssinceentry = 4 then sell all contracts next bar open; // Time Decay
SetStopLoss(400) // Cash Basedbased stop loss
Many thanks
Joe
JSParticipant
Senior
Hi Joe,
Try this one:
DefParam CumulateOrders=False
If Month=12 then
If TDOM=15 then
Buy 2 contract at Market
Set Stop pLoss 400
EndIf
EndIf
If POSITIONPERF>0 then
Sell at Market
EndIf
If BarIndex-TradeIndex(1)=4 then
Sell at Market
EndIf
Many thanks, I will give it a try.
All the best.
Joe