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

Data Series Issue

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

    Data Series Issue

    Hi,

    I'm developing an indicator based on SMA. My problem is when i plot it, the plot and arrows show up correctly on the 5 minute series, but if i change to say 15 minute series from the drop down, the arrows for my condition still looks back at my 5 minute data. how can i force it to use the 15 minute series or which ever i select from drop down?

    attached is my code.
    Last edited by priceisking; 07-30-2018, 12:57 PM.

    #2
    Hello priceisking,
    Thanks for your post.

    You just need to reference the correct BarsInProgress(BIP). For example, the following snippet would draw an up arrow on every bar, no matter what its period is because it is drawing every time the primary BIP updates.
    Code:
    if (BarsInProgress == 0)
    	Draw.ArrowUp(this, "Up Arrow"+CurrentBar, false, 0 , High[0]+2*TickSize, Brushes.Blue);
    Help Guide - Multi-Time Frame and Instrument
    Help Guide - BarsInProgress
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Thank you. That did the trick!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by funk10101, Today, 12:02 AM
      1 response
      10 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by GLFX005, Today, 03:23 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by nandhumca, Yesterday, 03:41 PM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by The_Sec, Yesterday, 03:37 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by vecnopus, Today, 06:15 AM
      0 responses
      1 view
      0 likes
      Last Post vecnopus  
      Working...
      X