Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Need Help - Horizontal Line on Indicator

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

    Need Help - Horizontal Line on Indicator

    I am trying to create a strategy that plots a horizontal line on the Momentum indicator, at the peak of a 50 period momentum indicator for the max of the past 12 periods (year). Is there anyway to do this?

    #2
    Seahawk13,

    Thank you for your post.

    You would use the DrawHorizontalLine(). In the overloads for that DrawObject you would use MAX() to get the Max value of the Momentum 12 period.

    Example -
    Code:
    DrawHorizontalLine("MyLine", MAX(Momentum(50)[0], 12), Color.Black);

    DrawHorizontalLine


    Let me know if this is the answer you are looking for.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Thanks so much for your help Cal, however is there anyway you can tell me the inputs if I'm using the ninjatrader strategy builder. I am not proficient enough to write my own code yet, thanks again

      Comment


        #4
        Seahawk13,

        The attached picture will get you what you are looking for.

        Let me know if this helps
        Attached Files
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rbeckmann05, Today, 05:50 AM
        0 responses
        1 view
        0 likes
        Last Post rbeckmann05  
        Started by doihaveto13, Today, 05:45 AM
        0 responses
        2 views
        0 likes
        Last Post doihaveto13  
        Started by giulyko00, 04-24-2024, 12:03 PM
        9 responses
        43 views
        0 likes
        Last Post giulyko00  
        Started by memonic, Yesterday, 01:23 PM
        2 responses
        25 views
        0 likes
        Last Post memonic
        by memonic
         
        Started by merc410, Today, 03:41 AM
        2 responses
        17 views
        0 likes
        Last Post merc410
        by merc410
         
        Working...
        X