• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 Mykro, Today, 11:01 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by bauerjj10, Today, 12:24 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Newtrader101, Today, 06:01 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_EricB  
        Started by Steve L, Today, 03:50 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by kherzfeldt6953, Today, 06:11 PM
        0 responses
        1 view
        0 likes
        Last Post kherzfeldt6953  
        Working...
        X