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
Using Swing indicator within an indicator
Collapse
X
-
Hi,
well it's working for me:
this is mcde feed by swing:
Print (".mcde feed by swing..=" + MACD(Swing(10).SwingHigh, 12, 26, 9)[0]);
this one bellow, swing feed by swing for example
Print ("..swing feed by swing..=" + Swing(Swing(10).SwingHigh, 100).SwingHigh[0]);
more working examples feed by swings:
Print(string.Format("{0} | SMA of SwingHigh: {1}", Time[0], SMA(Swing(10).SwingHigh, 100)[0]));
but don't get too confortable with this, some indicators will not work with feed by swing,
so double MACD(Swing(10).SwingHigh, 12, 26, 9)[0]; for you, should work
B
-
Hello Auxtin Maquieyra,
Thank you for your note.
To reference the swing indicator and the swing high, you could use the following,
Code:Swing(Close, 5).SwingHigh[0];
I would suggest opening a Strategy Builder under Control Center>New >Strategy Builder, and under the Conditions section of the builder, set up a condition using the swing indicator. You could then click the unlock code button in the builder to see how the strategy builder referenced the swing indicator. I provided a screen shot of how you could go about this.
Please let us know if you need further assistance.
Leave a comment:
-
Using Swing indicator within an indicator
Hello, im trying to use Swing indicator to do divergences with MACD. How can I access the Swing indicator ? Im trying with this (with all the parameters in...) and is not working
double hswing0=Swing(ISeries<double> input, int strength).SwingHigh(int barsAgo, 1, int lookBackPeriod) ;
Thanks in advance.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by arvidvanstaey, Today, 02:19 PM
|
4 responses
11 views
0 likes
|
Last Post Today, 04:08 PM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
60 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
||
Started by jordanq2, Today, 03:10 PM
|
2 responses
9 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
18 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
||
Started by algospoke, 04-17-2024, 06:40 PM
|
5 responses
47 views
0 likes
|
Last Post Today, 02:36 PM |
Leave a comment: