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:	186
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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      90 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      137 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      120 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      71 views
      0 likes
      Last Post PaulMohn  
      Working...
      X