I have a problem / question regarding a simple break out strategy I am working on. The logic is somewhat like:
Code: Select all
if myCondition then begin
buy ("ENTRY L") 1 contracts next bar H + myOffset stop;
sellshort ("ENTRY S") 1 contracts next bar L - myOffset stop;
end;
if MarketPosition = 1 then begin
sell ("LX") 1 contracts next bar myLongTarget limit;
sell ("LS") 1 contracts next bar myLongStop stop;
end;
if MarketPosition = -1 then begin
buytocover ("SX") 1 contracts next bar myShortTarget limit;
buytocover ("SS") 1 contracts next bar myShortStop stop;
end;
Is there a simple solution to this problem or do I have to reimplement the strategy using IntraBarOrderGeneration ?
Marc