TORONTO
Experience: Advanced
Platform: multi charts
Trading: crude cl
Posts: 19 since Sep 2016
Thanks Given: 10
Thanks Received: 6
|
So i have taken a couple diff systems and combined them, iam fairly new at EL and iam getting stuck atm trying to make the Open range midpoint the stop for the system any ideas what iam missing ?? It produces the entries but not the exits. In the future i want to make daily pivot extensions the targets but thats one day at a time here lol. I Have underlined the new code i added where the problems are most likely located. This is one of big mikes strategies iam changing to my method slowly while i learn EL.
thank you
Inputs:
startTime ( 8 ),
endTime ( 11 ),
startTradeTime ( 11 ),
stoploss ( 16 ),
target1 ( 32 ),
target2 ( 16 ),
target3 ( 72 ),
datramt ( 1 );
variables:
sessHi (0),
sessLo (0),
sessOp (0),
sessMid (0);
if date <> date[1] then begin
sessOp = Open;
sessLo = Low;
sessHi = High;
sessMid = (( high + low ) * 0.50 );
end;
if time < endTime * 100 then begin
if High > SessHi then SessHi = High;
if Low < SessLo then SessLo = Low;
end;
SetStopContract;
SetStopLoss( stoploss * BigPointValue );
// entries
if Close > SessHi then begin
Buy 3 Contracts Next Bar At Market;
end;
if Close < SessLo then begin
Sellshort 3 Contracts Next Bar At Market;
end;
// order management
if marketposition = 1 then begin
if currentbar < sessMid then sell 3 contracts next bar at open;
if marketposition = -1 then begin
if currentbar > sessMid then sell 3 contracts next bar at open;
end;
end;
|