Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Accessing dotted plot values instead of raw plot values in the "Swing" indicator.

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

    Accessing dotted plot values instead of raw plot values in the "Swing" indicator.

    Hi there,

    I've been trying to develop a divergence strategy using the stochastics indicator in NinjaTrader 8.

    I've added the swing indicator in the same panel of my stochastic and set the input series of the swing indicator to use the stochastic %K plot instead of price.

    I'm one step away from getting it to work properly.

    The only thing is when instantiating the "Swing" indicator into my strategy code, it seems to be accessing the raw plot data points instead of the dotted plot data points as seen in the image.

    Click image for larger version

Name:	image.png
Views:	179
Size:	42.8 KB
ID:	1305168

    The dotted plot data points are the actual swing high/low data points of the %K plot needed for my strategy to work.

    Is there a way to access these dotted plot data points? Specifically the first dot of each swing high/low.

    If anyone could share some advice or maybe refer me to some reference code on how to achieve this, it would be truly appreciated.

    Thanks in advance.

    #2
    Hello RoswellTrader,

    The swing indicator re writes its data as it finds new swings so you have to use its custom methods to find finalized swing instances. You can see an example of how to access the price data using the SwingHighBar and SwingLowBar methods in the following link.

    Comment


      #3
      Hey Jesse, thanks for your response.

      I will have a look and see what I can do.

      Much appreciated.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      78 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X