• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Customize Swing Indicator

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

    Customize Swing Indicator

    Hi everyone,

    I am a new user of NT, and I have a 'stupid' question.

    The default Swing Indicator draws short lines of dots for the high and low swings.
    How can I customize this into drawing single dots instead of lines of dots? (see attached pictures, AS-IS and TO-BE)

    Thanks for your help in advanced.

    Qosimo
    Attached Files

    #2
    Hello Qosmio,

    Thank you for writing in and welcome to the NinjaTrader Support Forum!

    This would involve modifying the indicator's code to change how the indicator plots.

    As the Swing indicator starts from a point and then plots backwards, we just want to plot the last dot (the last dot being the dot you want to show as seen in screenshot TO-BE) rather than the first dot on the chart.

    As you won't be able to modify the default Swing indicator, follow these instructions to create a copy:
    • Click New -> NinjaScript Editor in the Control Center
    • Double-click the Indicators folder in the right panel
    • Scroll down until you find the Swing indicator. Double-click on it.
    • Right-click within the code and select Save As


    Once you have saved the copy, you'll want to select it and then modify it.
    1. Comment out line 125
    2. Below this line, you'll want to change SwingHighPlot's index from i to Strength
    3. Comment out lines 133 and 134
    4. Comment out line 166
    5. Below this line, you'll want to change SwingLowPlot's index from i to Strength
    6. Comment out lines 174 and 175
    7. Comment out lines 204 and 205
    8. Comment out lines 219 and 220


    Once these changes have been made, ensure to compile the code.

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by TazoTodua, Today, 12:21 AM
    0 responses
    7 views
    0 likes
    Last Post TazoTodua  
    Started by U0000999, Today, 12:20 AM
    0 responses
    7 views
    0 likes
    Last Post U0000999  
    Started by sidviciousX, Yesterday, 06:47 AM
    1 response
    21 views
    0 likes
    Last Post bltdavid  
    Started by Mykro, Yesterday, 10:22 PM
    0 responses
    7 views
    0 likes
    Last Post Mykro
    by Mykro
     
    Started by rudccv, Yesterday, 08:42 PM
    0 responses
    6 views
    0 likes
    Last Post rudccv
    by rudccv
     
    Working...
    X