Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Adding plot to existing indicator ?

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

    Adding plot to existing indicator ?

    I wanted to add a plot to one of the Ninja indicators. So copy and rename, but what's simple for me on other software is hard for me on Ninja.

    For example on TOS taking the existing " Dailyopen " indicator and adding a fixed percentage line like .

    def Mopen = DailyOpen;
    plot H1H = (Mopen * 0.005)+mopen;
    plot Open = Mopen;

    and you done.

    So using the " CurrentDayOHL " as a starting point it looks like you'd have to " add(new Plot....etc, and or difine something in variables ? Looking for a fixed percentage above or below the Open.
    If this is real difficult I can live without it
    but was hoping maybe a couple lines of code and it could be done.
    Thanks in advance.












    #2
    T2020, correct you would need to do a 'save as' here first, just right click in the indicator code to do this and assign a new name to the copy created for you.

    Next step would be added a plot for your pupose in the Initialize() section of the script.

    Now you would need to create a public property for your plot in the 'Properties' region of the script, you can just copy over an existing one for taking the structure needed but be sure to change the names and Values[x] series assignments for your new plot accordingly (Values would just be the array of data values stored for your script, if you add a new plot in this would increase it's depth, so if you were at Values[4] before, you would 'link' the new plot to Values[5] now)

    Once done, you can .Set a value / do calculations for your new plot.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    597 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    343 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    103 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    556 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    555 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X