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

Strategy prints 0 values intermittenly

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

    Strategy prints 0 values intermittenly

    HI, Strategy plots 0 values intermittenly from indicator. How to fix it?
    -1. For example on 10th minute it prints values but on minute 11th it prints 0 even though values are there
    -2. On minute 10th newly level formed but it still prints old one from below
    Please see screenshot



    https://prnt.sc/PvrNo0ieaTZM

    #2
    Well i noticed i get 0 values printed only when using higher time frame plots from indicator.
    when higher time frame is not selected then it prints as suppose to

    Comment


      #3
      Hello tkaboris,

      A 0 likely indicates there are bars that do not have a value set.

      Note, that plots are synchronized with the primary series only during BarsInProgress 0.

      If you want to plot information from a higher time frame, set the plot series current bar value to the previous bars value if there is no value for this bar.

      Below is a link to an example.
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        ok thank you.
        i also have another question
        in my strategy that uses multi time frame indicator that plots values. So in strategy i set indicator as MTF and it plots values from higher time frame which is fine but it also plots values on current timeframe. So i have both plots fro HTF and current time frame and strategy opens orders on both of them. Is there a way to disable strategy from opening on current time frame plots and only open trades from HTF?
        thank you

        Comment


          #5
          Hello tkaboris,

          You can return if the BarsInProgress is not the index you want to perform on.


          However, as shown in my example, plot series values should be assigned to the previous bars value from the primary series.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Jonker, 04-27-2024, 01:19 PM
          3 responses
          23 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by businessman1929, 04-29-2024, 01:28 PM
          2 responses
          21 views
          0 likes
          Last Post businessman1929  
          Started by bltdavid, 03-27-2023, 05:32 AM
          18 responses
          347 views
          0 likes
          Last Post ETFVoyageur  
          Started by NM_eFe, Today, 05:15 PM
          0 responses
          5 views
          0 likes
          Last Post NM_eFe
          by NM_eFe
           
          Started by vitaly_p, Today, 05:09 PM
          0 responses
          7 views
          0 likes
          Last Post vitaly_p  
          Working...
          X