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

Find the high price when on the swing of a stochastics Swinghigh

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

    Find the high price when on the swing of a stochastics Swinghigh

    I use Swing(Stochastics) to find higher highs in the stochastics. I'm trying to line up the prices to get a lower high to get a divergence alert. But I'm trying to do this in the strategy builder. Would I need to code this? Either way, how would you find the high of the bar price when the the swing indicator finds a swing on the stochastics?

    #2
    Hello lehula,

    The Swing() indicator can be complex to use.

    Two things to note are that the the swing values can be set historically after the bar has already passed (meaning it might not have a value when that bar closes, but on a later bar the script may go back and set values or unset values for previous bars that have already past).

    Also, a return value of 0 (zero) will be returned if the CurrentBar number is less than the "strength" value, or a swing pivot has not yet been found.



    You are wanting to see when the SwingHigh and SwingLow plots are set. This can be done with IsValidDataPoint().


    However, sometimes the SwingHigh/SwingLow series have values set when these are not appearing on the chart. I have sometimes recommended using Swing().Values[0] and .Values[1] to access the actual plots of the chart to help with this.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    2 views
    0 likes
    Last Post Javierw.ok  
    Started by timmbbo, Today, 08:59 AM
    2 responses
    10 views
    0 likes
    Last Post bltdavid  
    Started by alifarahani, Today, 09:40 AM
    6 responses
    40 views
    0 likes
    Last Post alifarahani  
    Started by Waxavi, Today, 02:10 AM
    1 response
    18 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by Kaledus, Today, 01:29 PM
    5 responses
    15 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X