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

Calculate.OnPriceChange Still drawing on bar close

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

    Calculate.OnPriceChange Still drawing on bar close

    I assume I am missing something obvious, but I cannot get my indicator to draw a circle on a bar at the bar's open or when price crosses an indicator (PSAR). Calculate is set to Calculate.OnPriceChange, but in both cases the circles are drawing at the bar's close.

    Any help would be appreciated.​

    Click image for larger version

Name:	image.png
Views:	37
Size:	22.4 KB
ID:	1291626


    Click image for larger version

Name:	image.png
Views:	31
Size:	156.8 KB
ID:	1291627

    ​​
    ​​​

    #2
    Hello WestTrader,

    Thank you for your post.

    I see that part of your condition checks for "IsFirstTickOfBar" which would cause the action to occur only on the close of a bar:


    If you remove this bool from your condition, this should allow the logic to be checked on price change rather than only on bar close.

    Please let us know if we may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      Emily,

      Thanks for your response.

      Turns out the "IsFirstTickOfBar" was not the problem. I needed to turn on "Tick Replay" and change my data provider from Interactive Brokers to Kinetick Live Feed to receive tick data. Once I did this the indicator was drawing where expected.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,404 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by Shai Samuel, 07-02-2022, 02:46 PM
      4 responses
      95 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by DJ888, Yesterday, 10:57 PM
      0 responses
      7 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by MacDad, 02-25-2024, 11:48 PM
      7 responses
      159 views
      0 likes
      Last Post loganjarosz123  
      Started by Belfortbucks, Yesterday, 09:29 PM
      0 responses
      8 views
      0 likes
      Last Post Belfortbucks  
      Working...
      X