Code: Select all
vars:
unitSize(10000),
lastPositionPL(0);
lastPositionPL = Positionprofit(1);
If lastPositionPL < 0 then begin
unitSize = 20000;
End
Else
unitSize = 10000;
//Entry Logic
If BullC = NumBC and BCavg <> 0 then
Buy ("LE") unitSize contracts next bar market;
If BearC = NumBR and BCavg <> 0 then
SellShort ("SE") unitSize contracts next bar market;
Code: Select all