I have sorted out the issue on other strats by adding FirstTickofBar but on a LineBreak Chart it doesn't seem to help.
Here is my entry signal and ATM call code;
// Long entry signal if cross above daily PP
if (Position.MarketPosition == MarketPosition.Flat
&& orderIdL.Length == 0
&& atmStrategyIdL.Length == 0
&& FirstTickOfBar
//&& Close[0] >= Open[0]
//&& Close[1] > GetCurrentAsk()
&& BarsSinceEntry() > 1
&& CrossAbove(Close, Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).PP, 1)
|| CrossAbove(Close, Pivots(PivotRange.Daily, HLCCalculationMode.CalcFromIntradayData, 0, 0, 0, 20).R1, 1)
//&& Close[1] + prevBarsPlusTicks*TickSize > GetCurrentAsk()
//&& Close[1] < GetCurrentBid()
)
{
atmStrategyIdL = GetAtmStrategyUniqueId();
orderIdL = GetAtmStrategyUniqueId();
orderBarL = CurrentBar;
AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Market, 0, High[1], TimeInForce.Day, orderIdL, "TF_2_Ren_DPP_Long", atmStrategyIdL);
}
1. Is it possible to implement && BarsSinceEntry() > 1 in an ATM strat somehow? If so, where do you place it?
2. Is there a master instrument reference I could check so if a contract in that class is open then no further signals will be taken? I have Position.MarketPosition == MarketPosition.Flat in the entry signal section to prevent multiple orders but as the order is passed to the ATM function the strat is under the impression that there are no open orders. Do I need to start using IOorders or arrays?

Comment