Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

entry the next candle with Calculate.OnEachTick

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    entry the next candle with Calculate.OnEachTick


    Hello, I am developing a strategy and I want to enter at the tick of the next candle. I did this, but it doesn't work for me. If anyone knows what's wrong, I'd appreciate it.

    Attached Files

    #2
    Hi, thanks for writing in. If this is not working in the historical backtest, please enable Tick Replay so the IsFirstTickOfBar condition will trigger historically. If you continue to run into issues, please Export your strategy and post it here so I can test it.

    Kind regards.

    Comment


      #3

      Thanks for answering. the strategy does not carry out operations neither in live nor in historical data. Just in case I use range candles
      Attached Files

      Comment


        #4
        Hi, thanks for posting that. Please call Update() on the BuySellPressure object since the script is running OnEachTick e.g.

        Code:
        if (BarsInProgress != 0)
        return;
        
        if (CurrentBars[0] < 1)
        return;
        
        BuySellPressure1.Update();
        
        if (IsFirstTickOfBar)
            //continue with entry logic.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        80 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        54 views
        0 likes
        Last Post CarlTrading  
        Working...
        X