I have a problem with in MC6 and enabled IntraBarOrderGeneration. In the backtest the strategy works fine, but in live trading there are no orders being generated at all. And I do not get my head around what I am doing wrong.
The strategy logic is like this:
Code: Select all
if Barstatus(1) = 2 then
begin
Signal = 0;
{calculate entry condition}
if CurrentBar > 1 and MarketPosition = 0 and MyEntryCondition
then begin
LowerBound = L - (MinMove / PriceScale);
UpperBound = H + (MinMove / PriceScale);
Signal = 1;
end;
end;
if MarketPosition = 0 and Signal = 1
and time > SessStartTime and time < SessEndTime
then begin
if C < UpperBound
buy ("ENTRY L") 1 contracts next bar (UpperBound) stop;
if C > LowerBound
sellshort ("ENTRY S") 1 contracts next bar (LowerBound) stop;
end;
if MP = 1 then begin
{calculate target / stop}
sell ("LX") 1 contracts next bar longTarget limit;
sell ("LS") 1 contracts next bar longStop stop;
end;
if MP = -1 then begin
{calculate target / stop}
buytocover ("SX") 1 contracts next bar shortTarget limit;
buytocover ("SS") 1 contracts next bar shortStop stop;
end;
Code: Select all
IntraBarPersist
It cannot see what should be different in backtest than it is in live trading. Any help is greatly appreciated.
Marc