Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need Real Simple Code Help for Indicator

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

    Need Real Simple Code Help for Indicator

    Hi, how would I need to set the plot code for this:

    (High/Low)-1)*100

    If anyone could post the exact plot line I need to put in for this it would be greatly appreciated,

    Thanks for any help,
    Reed

    #2
    What is wrong with this code?

    Plot0.Set(PriorDayOHLC().PriorHigh / PriorDayOHLC().PriorLow -1 * 100

    Seems like that is what should work, but it doesnt... what is wrong with this code, any help is much needed and apreciated...

    Comment


      #3
      tshirtdeal, you can only divide individual data series objects, not the full data series - try this for example -

      Code:
       
      double myValue = ((PriorDayOHLC().PriorHigh[0] / PriorDayOHLC().PriorLow[0]) - 1) * 100;
      
       
      Plot0.Set(myValue);

      Comment


        #4
        Thanks Bertrand- How Do I Add Other Plots?

        How do I then add 2 other plots kind of like for values of the indicator,

        such as the RSI or Stochastics where you can put lines across at certian values?

        Comment


          #5
          Hello,

          I suggest looking at one of those indicators and mimicing what they do to produce it. For Stoch. here are some key elements to look at:
          //in initialize
          Add(new Plot(Color.Orange, "K"));

          //in properties
          [Browsable(false)]
          [XmlIgnore()]
          public DataSeries K
          {
          get { return Values[1]; }
          }
          DenNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          152 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          89 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          131 views
          2 likes
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          127 views
          1 like
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          107 views
          0 likes
          Last Post CarlTrading  
          Working...
          X