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

Cannot get PlotColors to work properly

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

    Cannot get PlotColors to work properly

    Attached is the NinjaScript I am writing and everything is fine except I cannot get the WMA plot to show on the chart. Any help would be appreciated...
    Attached Files

    #2
    Hello,

    Thank you for the question.

    This would be because of how you are setting the plot for the WMA.

    You have added a plot for the WMA in your Initialize but you are not setting this plot in the script.

    Currently you have :

    Code:
    Value.Set(val / weight);
    instead you would need:

    Code:
    Values[2].Set(val / weight);
    You have 3 plots, the 3rd would be index 2 because the index starts at 0.
    You are setting plot 0 by using Value, instead you need to specify the 3rd plot or index 2

    In your Rising or Falling condition, you have also used Value, you would need to change this to Values[2] instead to get the WMA plot for the Rising/Falling condition

    Please let me know if I may be of additional assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Works perfect! Thanks, I figured it was something simple I was missing!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Jonker, 04-27-2024, 01:19 PM
      3 responses
      22 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
      346 views
      0 likes
      Last Post ETFVoyageur  
      Started by NM_eFe, Today, 05:15 PM
      0 responses
      4 views
      0 likes
      Last Post NM_eFe
      by NM_eFe
       
      Started by vitaly_p, Today, 05:09 PM
      0 responses
      4 views
      0 likes
      Last Post vitaly_p  
      Working...
      X