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 saltminer, 07-07-2025, 01:43 PM
        1 response
        47 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by idude, Yesterday, 05:06 AM
        0 responses
        20 views
        0 likes
        Last Post idude
        by idude
         
        Started by music_p13, 07-05-2025, 11:33 PM
        1 response
        40 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by gubbar924, 03-18-2018, 05:15 PM
        43 responses
        5,487 views
        0 likes
        Last Post ESMC377
        by ESMC377
         
        Started by siqalexcg, 06-30-2025, 08:06 PM
        1 response
        205 views
        0 likes
        Last Post Emma1
        by Emma1
         
        Working...
        X