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:	173
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 NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      86 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      151 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      79 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      52 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      59 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X