Taking a stab at my first strategy and have a question. The same conditions that draw the "setup" vertical line (dashed green in the picture), are used to open an order. However, the order gets opened a bar later than I would expect.
In this picture, I would expect the order to have been opened on the first red bar after the green vertical line.
AddVerticalLine
AddOrder
In this picture, I would expect the order to have been opened on the first red bar after the green vertical line.
AddVerticalLine
Code:
AddVerticalLine(show_setups and bullish_2m_atr_cross and !bullish_2m_atr_cross[1] and bullish_5m_atr and (bullish_15m_atr or bullish_tmo),"Buy", if ADX_20_plus then Color.GREEN else if ADX_25_plus then Color.DARK_GREEN else Color.YELLOW, Curve.SHORT_DASH);
AddOrder
Code:
AddOrder(OrderType.BUY_TO_OPEN, trade_setups and ((bullish_2m_atr_cross and !bullish_2m_atr_cross[1] and bullish_5m_atr and (bullish_15m_atr or bullish_tmo)) or (bullish_5m_atr_cross and !bullish_5m_atr_cross[1] and bullish_2m_atr and bullish_tmo)));