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.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by glivv, Today, 09:17 AM
    0 responses
    5 views
    0 likes
    Last Post glivv
    by glivv
     
    Started by cmv727, Today, 08:48 AM
    0 responses
    6 views
    0 likes
    Last Post cmv727
    by cmv727
     
    Started by Kaiviti57, Today, 04:13 AM
    2 responses
    8 views
    0 likes
    Last Post bltdavid  
    Started by aslane, Today, 08:02 AM
    0 responses
    6 views
    0 likes
    Last Post aslane
    by aslane
     
    Started by DTSSTS, Today, 07:03 AM
    0 responses
    14 views
    0 likes
    Last Post DTSSTS
    by DTSSTS
     
    Working...
    X