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 Hwop38, 05-04-2026, 07:02 PM
          0 responses
          161 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          309 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          245 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          349 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          179 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Working...
          X