Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

A Little Help For My Indicator

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

    #31
    Originally posted by lee612801 View Post
    Hi koganam,

    Thanks again for all the help, I really appreciate it. I added the ToTime statement you suggested and was able to change to plot output, but have not been able to get a linear plot using the single runningValue calculation from each day. So I am looking to plot linearly from point to point using only a single point for each day. The indicator is calculating only a single value for each day on a minute chart, but I cant seem to get the plot to go from each single runningValue at the end of each day. One thing I noticed is that depending on what I change the time to within the ToTime command, sometimes it calculates the runningValue correctly, and sometimes it does not... I've been a little stumped on how the DataSeries plays into the script. I would have figured that it would not have to be in there for the script to calculate correctly, it just would not plot anything. But if I remove the DataSeries (SMI.set), it fails to calculate the runningValue correctly. Maybe this is how its suppose to work...

    In the meantime, I am using a 30 minute timeframe chart (no multi-timeframe anymore) to troubleshoot. I couldn't get the plot function within the indicator to draw a straight line as I'd like, so I figured I would get the indicator to just calculate a single point even if it doesn't show, and then use a SMA to provide the plot using these points. Eventually, this is what I will want to do anyway. It almost worked, but the SMA is plotting more than just these single numbers (so I guess I am NOT plotting single values ). Certainly a little frustrating for me, but I will keep working it.

    Anyway, I've attached the current incarnation of this indicator in case you might have some ideas.

    Thanks,

    Regards,

    Lee
    There is a lack of clarity here. You say you want it plotted once. Then in the same breath you say that you want to draw a line.

    A line is always a series of points, and a plotted line must go through those points. If you want to draw a line through different points in one day: that line represents the trajectory through those points in the day, so you cannot draw only once, if you want to plot a line. You may have to clarify better what you mean.

    You either want to draw a line or you want to draw a point: it is impossible, in an absolute sense, to do both.

    Comment


      #32
      koganam,,

      you are absolutely right, how I explained it was confusing. So I put together a picture that hopefully makes it more clear. I really just want a single point for each day in the plot....

      Hope this makes more sense.
      Attached Files

      Comment


        #33
        Originally posted by lee612801 View Post
        koganam,,

        you are absolutely right, how I explained it was confusing. So I put together a picture that hopefully makes it more clear. I really just want a single point for each day in the plot....

        Hope this makes more sense.
        There are a few ways to do what you want: a standard Plot() is not one of them.

        You can either use the DrawLine() method to join your points, or you can use a custom Plot(0 which essentially will do the same, either using NT methods or using standard C# draw methods.

        For the latter, using the DrawPath() method will probably be easiest, as you have all the link points coming up in sequence, and so easily added to the GraphicsPath().

        Comment


          #34
          Hi koganam,

          Thanks again for all the help. Although I didn't use the Drawline option, I was able to just apply a SMA to the indicator in the chart to get what I was looking for. I had to set the time period correctly, but its basically doing what I would like. Its not the complete end product I was looking for, but its good enough and I'm about done with ninjascript for now

          Anyway, thanks again for all the help. Would not have been able to get it with out your help.

          Regards,


          Lee

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          576 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X