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

Fractal Above/Below Horizontal Line

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

    Fractal Above/Below Horizontal Line

    Hello Support, Im trying to make an indicator that checks if price has turned above/below a manually drawn Horizontal Line, something like:

    (W/Renko Candles)

    if ( (Close[3] < Close[2] && Close[2]> Close[0]) && Close[0] >hLine.Y ) && FirstTickOfBar ) // Renko Fractal Down
    {

    Alert goes off

    }

    just making sure this approach is the correct one, how do i check for Hlines? is the generic "hLine.Y" ok? , just need one Horizontal Line on the chart.

    Thank you!


    #2
    Hello kabott, thanks for your post.

    You may use the DrawObjects collection to get a specific horizontal line. See the example on this page, specifically Example #3, "Looping through the collection to find specific draw objects"


    Once you get the draw object assigned, you can reference the horizontal line's properties. Here is the documentation on the IHorizontalLine object:



    Best regards.
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CortexZenUSA, Today, 12:53 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Started by CortexZenUSA, Today, 12:46 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Started by usazencortex, Today, 12:43 AM
    0 responses
    5 views
    0 likes
    Last Post usazencortex  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    168 responses
    2,266 views
    0 likes
    Last Post sidlercom80  
    Started by Barry Milan, Yesterday, 10:35 PM
    3 responses
    13 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X