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 Rogers101, 05-05-2024, 11:30 AM
    10 responses
    33 views
    0 likes
    Last Post Rogers101  
    Started by tradingnasdaqprueba, Today, 03:42 AM
    2 responses
    21 views
    0 likes
    Last Post tradingnasdaqprueba  
    Started by cmtjoancolmenero, 04-25-2024, 03:58 PM
    21 responses
    114 views
    0 likes
    Last Post cmtjoancolmenero  
    Started by Quanto, 04-17-2024, 10:43 AM
    3 responses
    28 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Mindset, Yesterday, 06:19 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X