Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Divergence strategy with some oscillator and the swing indicator

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

  • NinjaTrader_PaulH
    replied
    Hello jerryblack,

    Thanks for your reply.

    Please see the help guide for the swing indicator which shows the syntax for both the bars ago as well as the value. A simple example is also provided in the link.

    https://ninjatrader.com/support/help...nt8/?swing.htm

    Leave a comment:


  • jerryblack
    replied
    Thanks for answering . Could you give me an example of how to detect swing poin in ninjascript? thanks

    Leave a comment:


  • NinjaTrader_PaulH
    replied
    Hello jerryblack,

    Thanks for your post.

    Trying to accomplish this in the Strategy Builder would be difficult at best and may not be possible.

    In the Strategy Builder, the Swing indicator only provides access to the current swing high or swing low.

    An important note about the swing indicator. The swing indicator does not provide a swing point until the "strength" bars have passed. For example with a strength of 5, this means that the swing high or swing low will not be confirmed until the close of the 5th bar after the swing point. It looks like you are showing a strength setting of 2 which means these values are not known until the close of the 2nd bar after the swing point, so in your screenshot you would need to add two bars to the right of where your are pointing to visualize where the swing changes actually are known.

    You can detect when the swing point changes. You can save the swing point to a variable and can compare the previous swing high to the current swing high (same with swing low).

    You can likely create what you need in Ninjascript where you do have access to other information about the swing such as accessing what bar the swing started on.

    An alternative would be to have the strategy created for you, if this is of interest we can provide a reference to 3rd party programmers in the NinjaTrader ecosystem.

    Leave a comment:


  • Divergence strategy with some oscillator and the swing indicator

    Hello, I want to do a divergence strategy with some oscillator and the swing indicator, using a high and low threshold. I want to detect the highest pivot in the oscillator, against the next pivot and see if it is lower and go short. the same with the long ones. attached there is an example image, and if is possible to do it in the builder



    thanks

Latest Posts

Collapse

Topics Statistics Last Post
Started by davidoazak, Today, 01:04 AM
0 responses
5 views
0 likes
Last Post davidoazak  
Started by biolifeketofr, Today, 12:25 AM
0 responses
3 views
0 likes
Last Post biolifeketofr  
Started by biolifeketofr, Today, 12:24 AM
0 responses
3 views
0 likes
Last Post biolifeketofr  
Started by hlwwith, Today, 12:01 AM
0 responses
3 views
0 likes
Last Post hlwwith
by hlwwith
 
Started by nordic, Yesterday, 11:29 PM
0 responses
5 views
0 likes
Last Post nordic
by nordic
 
Working...
X