Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

How to entry during the candle still running

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

    How to entry during the candle still running

    Dear Team,
    Currently I'm using entry market long and short.

    The problem is,my entry can only occur at the beginning of the bar,this will make an issue.For example,I entry short at the beginning of candle1,if the price falls a lot,my profit short will make entry short exit earlier,because my profit has reached the target.

    But at this time the price is still falling,and this candle is still match my short condition.So how can I entry short this candle again.Now I can't entry it until next candle.

    Thank you very much!

    #2
    Hello williamzz, thank you for your post.

    The only way to get intrabar OnBarUpdate calls is to set the Calculate to Calculate.OnEachTick or Calculate.OnPriceChange. The strategy must be able to handle multiple OnBarUpdate calls, meaning you might need to use IsFirstTickOfBar to separate "Bar Close" logic from "On Each Tick" logic. There is an example of this here with additional documentation. You will also need to set "Entries per direction" in the strategy setup menu to allow multiple entries in the same direction.

    Please let me know if you have any further questions.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your reply.Is it available in strategy builder?

      Comment


        #4
        Hello williamzz,

        Unfortunately, the code will need to be unlocked to use IsFirstTickOfBar.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by usazencort, Today, 01:16 AM
        0 responses
        1 view
        0 likes
        Last Post usazencort  
        Started by kaywai, 09-01-2023, 08:44 PM
        5 responses
        603 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by xiinteractive, 04-09-2024, 08:08 AM
        6 responses
        23 views
        0 likes
        Last Post xiinteractive  
        Started by Pattontje, Yesterday, 02:10 PM
        2 responses
        22 views
        0 likes
        Last Post Pattontje  
        Started by flybuzz, 04-21-2024, 04:07 PM
        17 responses
        230 views
        0 likes
        Last Post TradingLoss  
        Working...
        X