Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Here is the market analyzer template with ABC signals, swing trend and the divergence signals. The settings are for daily bars. You have to change them to your preferred time frames. The underlying divergence indicator and it's settings can be changed under the property "Div indicator" and "Paremeter 1,2,3".
I already sent a new PriceActionSwing version to @Big Mike and first after he uploads the updated version and you downloaded the new one from the download section this template will work. He probably will write a post in this thread when he did it.
Save the file under ...\Documents\NinjaTrader 7\templates\MarketAnalyzer and then load it in a market analyzer.
^Thanks everyone for making this thread so successful so far!
But my question is 2 fold. 1) Can we change the divergence indicators from the standard ones (Sto, MACD, etc) to something else? ANd if so, how? and 2) What is everyones favorite divergence indicator to use and what settings?
Thanks for your response, sorry I am so late in coming back, but as I asked the question in February and had no response I gave up watching. A lot of water has flowed under the bridge since then, I have this on all my charts and I have been using the setting 3, Swing Size on 1hr and 15 min and 5 min charts, it picks up all the HH, HL, LL, LH you just get the occasional false signal but now I am better able to judge them for myself. I used the indi to train my eye for the swings, now I really do not need it anymore. ABC/ 123 Patterns are obvious now too. So I turned off everything bar the HH , HL, LH, LL markers because otherwise the chart is too cluttered and I couldn,t see the price action for all the trees.
Fanatastic Indi, I am grateful for it, it has helped train my eye, but now I do not need the training wheels anymore.
DORSCHDEN++++I have a question for you. What are the DIVERGENCE settings in the parameter 1 parameter2 parameter3 stand for in the CUSTOM FisherTransform? What timeframes are they measuring from? The reason that I ask is that I would like to see if there is a way that I could measure the DIVERGENCE on a bigger set of prices (From one swing low to the next swing low, etc) for my fib calculations. I believe that if I could see the hDIV print when I see the FIB confluence, this would add strength to the trade!!!!!!!!
I too am trying to set up the divergence feature with a custom indicator that I use all the time anaTradersDynamicIndexColour but I have no coding skills at all, following your advice
Divergence:
Here you can set all settings to display divergence in the chart.
Div indicator:
Represents the indicator for the divergence calculations. You can add one or more indicators in the source code under the value "custom". You just have create an instance of you indicator in the "Divergence" region in the OnStartUp() function (Line 670 in the source code) which is only is one line and in the OnBarUpdate() function in the "Initialize variables" region in the "Divergence" region (Line 1440) you have to assign the indicator values to the data series which are only two lines and than you're done. The PAS makes the rest.
Param1, Param2, Param3
Represents the first parameter for the indicator you choose. E.g. the standard MACD(12,26,9) would be
Param1 = 12
Param2 = 26
Param3 = 9.
I have got this.
LINE 670. case DivergenceMode.Custom:
anaTradersDynamicIndexColour = anaTradersDynamicIndexColour (param1, param2, param3);
I do not know what to put in LINE 1440.
These are the variables from the custom INDI
private int rsiPeriod = 13;
private int pricePeriod = 2;
private int signalPeriod = 7;
private int bandPeriod = 34;
private double stdDevNumber = 1.62;
I am guessing that for divergence you only need 2 data sets 1 for high and 1 for low, but which do I use? and what syntax do I use.
Can anyone help. Much appreciated if you can. Attached is a chart with said INDI at the bottom.
To answer the divergence questions I wrote some instructions.
With the PriceActionSwingPro we can very easily create divergence signals based on any indicator or oscillator with a few tweaks in the code. The only requirement is that the base indicator has a plot or a public data series output to access the base indicator values within the PriceActionSwingPro.
To get the names of the data series that save the base indicator values you can look in the base indicators source code in the "properties" region for the words "public dataseries" and the word after this two words is the data series name.
E.g. the MACD has three different values where we can calculate the divergence on.
1. macd value (Plot name: "Macd" = DataSeries name: "Default" = "Value")
2. average value (Plot name = DataSeries name: "Avg")
3. difference value (Plot name = DataSeries name: "Diff")
If the indicator has no public data series but plots values like the FisherTransformation than the name of the public data series is "Value".
Now we have the name of the data series where all the values from the base indicator are saved and which one we want to compare against the swings to calculate the divergence.
The next step is to change the source code of the PriceActionSwingPro. NT's standard FisherTransformation will be used as example.
1. Create a variable of the base indicator in the region "Variables" in line 52.
private FisherTransform fisherTransform;
2. Change the "divergenceMode" to custom in the region "Variables" in line 138.
3. Set the parameter of the base indicator in the param1, param2, parem3 variables in line 159. If the base indicator has only one variable use param1. Param2 and param3 are ignored. If the base indicator has more than 3 parameters create another parameter e.g. "param4" and make it public in the "properties" region.
private int param1 = 10;
4. Create the base indicator values. In the region "Create forms" in the region "Divergence" in the "case DivergenceMode.Custom" call the base indicator with the set parameters in line 675.
case DivergenceMode.Custom: fisherTransform = FisherTransform(param1);
// Add custom divergence indicator here
break;
5. Access the base indicator values. In the "OnBarUpdate" function in the region "Initializes Variables" in the region "Divergence" in the "case DivergenceMode.Custom" access the base indicator values in line 1457.
case DivergenceMode.Custom: divergenceDataHigh = fisherTransform.Value;
divergenceDataLow = fisherTransform.Value;
// Add custom divergence indicator here
break;
There is a high and a low series two to accomplish divergence calculation where the base indicator values (or another instrument) have a high and a low. e.g. candlesticks. With this solution you can also calculate divergence based on a different instrument, e.g. you have a FDAX chart and calculate divergence on the FESX.
6. And now we are already done! The PriceActionSwingPro indicator will do the rest. Just compile it and load it on a chart or in the market analyzer.
To answer the divergence questions I wrote some instructions.
With the PriceActionSwingPro we can very easily create divergence signals based on any indicator or oscillator with a few tweaks in the code. The only requirement is that the base indicator has a plot or a public data series output to access the base indicator values within the PriceActionSwingPro.
To get the names of the data series that save the base indicator values you can look in the base indicators source code in the "properties" region for the words "public dataseries" and the word after this two words is the data series name.
E.g. the MACD has three different values where we can calculate the divergence on.
1. macd value (Plot name: "Macd" = DataSeries name: "Default" = "Value")
2. average value (Plot name = DataSeries name: "Avg")
3. difference value (Plot name = DataSeries name: "Diff")
If the indicator has no public data series but plots values like the FisherTransformation than the name of the public data series is "Value".
Now we have the name of the data series where all the values from the base indicator are saved and which one we want to compare against the swings to calculate the divergence.
The next step is to change the source code of the PriceActionSwingPro. NT's standard FisherTransformation will be used as example.
1. Create a variable of the base indicator in the region "Variables" in line 52.
private FisherTransform fisherTransform;
2. Change the "divergenceMode" to custom in the region "Variables" in line 138.
3. Set the parameter of the base indicator in the param1, param2, parem3 variables in line 159. If the base indicator has only one variable use param1. Param2 and param3 are ignored. If the base indicator has more than 3 parameters create another parameter e.g. "param4" and make it public in the "properties" region.
private int param1 = 10;
4. Create the base indicator values. In the region "Create forms" in the region "Divergence" in the "case DivergenceMode.Custom" call the base indicator with the set parameters in line 675.
case DivergenceMode.Custom: fisherTransform = FisherTransform(param1);
// Add custom divergence indicator here
break;
5. Access the base indicator values. In the "OnBarUpdate" function in the region "Initializes Variables" in the region "Divergence" in the "case DivergenceMode.Custom" access the base indicator values in line 1457.
case DivergenceMode.Custom: divergenceDataHigh = fisherTransform.Value;
divergenceDataLow = fisherTransform.Value;
// Add custom divergence indicator here
break;
There is a high and a low series two to accomplish divergence calculation where the base indicator values (or another instrument) have a high and a low. e.g. candlesticks. With this solution you can also calculate divergence based on a different instrument, e.g. you have a FDAX chart and calculate divergence on the FESX.
6. And now we are already done! The PriceActionSwingPro indicator will do the rest. Just compile it and load it on a chart or in the market analyzer.
dorschden, thank you very much for the reply, I am not a programmer, much too difficult for me.