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!
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
NinjaTrader
Divergence strategy with some oscillator and the swing indicator
Collapse
X
-
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.
-
Thanks for answering . Could you give me an example of how to detect swing poin in ninjascript? thanks
Leave a comment:
-
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
1 PhotoTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by proptradingshop, 03-21-2024, 09:50 AM
|
5 responses
26 views
0 likes
|
Last Post Today, 05:17 AM | ||
Started by MaupinFinche, Today, 05:08 AM
|
0 responses
4 views
0 likes
|
Last Post
by MaupinFinche
Today, 05:08 AM
|
||
Started by Enkidu, Yesterday, 06:40 AM
|
9 responses
35 views
0 likes
|
Last Post
by Enkidu
Yesterday, 01:11 PM
|
||
Started by Mestor, 03-10-2023, 01:50 AM
|
12 responses
309 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
268 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
Leave a comment: