NexusFi: Find Your Edge


Home Menu

 





PriceActionSwing discussion


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Silvester17 with 177 posts (570 thanks)
    2. looks_two dorschden with 99 posts (1,124 thanks)
    3. looks_3 Big Mike with 52 posts (90 thanks)
    4. looks_4 jmont1 with 51 posts (23 thanks)
      Best Posters
    1. looks_one dorschden with 11.4 thanks per post
    2. looks_two Silvester17 with 3.2 thanks per post
    3. looks_3 Big Mike with 1.7 thanks per post
    4. looks_4 sudhirc with 1.7 thanks per post
    1. trending_up 965,554 views
    2. thumb_up 2,947 thanks given
    3. group 613 followers
    1. forum 2,093 posts
    2. attach_file 615 attachments




 
Search this Thread

PriceActionSwing discussion

  #481 (permalink)
 dorschden 
Germany
 
Experience: Master
Platform: NinjaTrader
Posts: 112 since Jun 2009
Thanks Given: 59
Thanks Received: 1,143

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.


Attached Files
Elite Membership required to download: PasMa2.xml
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Futures True Range Report
The Elite Circle
Exit Strategy
NinjaTrader
Deepmoney LLM
Elite Quantitative GenAI/LLM
Better Renko Gaps
The Elite Circle
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
36 thanks
GFIs1 1 DAX trade per day journal
22 thanks
NexusFi site changelog and issues/problem reporting
22 thanks
The Program
20 thanks
  #482 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,399 since Jun 2009
Thanks Given: 33,173
Thanks Received: 101,539


dorschden View Post
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.

Done, and Notifications sent.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #483 (permalink)
 NathanExplosion 
Columbus
 
Experience: Beginner
Platform: NinjaTrader
Trading: Es, forex, stocks
Posts: 23 since Oct 2011
Thanks Given: 7
Thanks Received: 17


Thanks guys, this is great!!

Reply With Quote
Thanked by:
  #484 (permalink)
 bubbadirect 
Indianapolis, IN
 
Experience: Advanced
Platform: NinjaTrader, MT4
Trading: Currency FUtures
Posts: 11 since Aug 2011
Thanks Given: 20
Thanks Received: 4

^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 in advance,
bubbadirect

Reply With Quote
Thanked by:
  #485 (permalink)
 
dee50's Avatar
 dee50 
cordoba spain
 
Experience: Intermediate
Platform: ninjatrader
Trading: 6E
Posts: 71 since Feb 2011
Thanks Given: 77
Thanks Received: 38


mystiq View Post
I use a setting of 10....for all timeframes....it catches most (a) (b)and (c) swings...just have to watch out for false patterns before swing (c) occurs...then just reverse the trade

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.

Just added a chart to show how I use this Indi.

Attached Thumbnails
Click image for larger version

Name:	6E TDI 16 - 20 07 2012.png
Views:	679
Size:	67.5 KB
ID:	82211  
Reply With Quote
Thanked by:
  #486 (permalink)
 bubbadirect 
Indianapolis, IN
 
Experience: Advanced
Platform: NinjaTrader, MT4
Trading: Currency FUtures
Posts: 11 since Aug 2011
Thanks Given: 20
Thanks Received: 4


dorschden View Post
@bomberone1 and @yiman unfortunately there is no Multicharts version.



@Vajce18 add the following bold lines to the code, change line 138 to custom and compile it. In the "param1" parameter you can set the period, e.g. 10. Now it should work.

Line 138:
private DivergenceMode divergenceMode = DivergenceMode.Custom;

Line 162:
private Stochastics stochastics;
private MACD macd;
private FisherTransform fisherTransform;

Line 670:
case DivergenceMode.Custom:
fisherTransform = FisherTransform(param1);
// Add custom divergence indicator here
break;

Line 1440:
case DivergenceMode.Custom:
divergenceDataHigh = fisherTransform.Value;
divergenceDataLow = fisherTransform.Value;

// Add custom divergence indicator here
break;





@NathanExplosion, unfortunately this isn't possible. You have to change the code to accomplish this. There are several ways to do this. Because of your moderate coding skills I suggest that you create some variables to save the certain swing relations and make them public. E.g. create a variable called lastLowRelation2 in which you save the 3rd last swing low relation (swing low relation = LL, HL, DB) and in line 2582 you write "lastLowRelation2 = lastLowRelation;" Then you have in the variables curLowRelation, lastLowRelation, lastLowRelation2 the swing low relations. Now you have to make this variables accessible. In "Region Properties" in "Region Dataseries" you add following line for each variable (same for the long values). Now you should be able to access the values from within a strategy. I didn't test this, but it should work.
 
Code
[Browsable(false)]
public Relation CurLowRelation
{
  get { return curLowRelation; }
}


Set in the PAS indicator menu in the category "Divergence" the property "Div indicator" to MACD.

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!!!!!!!!

Thank you in advance, bubbadirect

Reply With Quote
Thanked by:
  #487 (permalink)
 
dee50's Avatar
 dee50 
cordoba spain
 
Experience: Intermediate
Platform: ninjatrader
Trading: 6E
Posts: 71 since Feb 2011
Thanks Given: 77
Thanks Received: 38

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.

Attached Thumbnails
Click image for larger version

Name:	divergence.png
Views:	531
Size:	72.3 KB
ID:	82311  
Reply With Quote
  #488 (permalink)
 2010 
Boston
 
Experience: Advanced
Platform: Ninja Trader
Trading: TF,CL
Posts: 35 since Apr 2011
Thanks Given: 35
Thanks Received: 3

Hi, the swing pro indicator is very nice, I would like to use it on a stochastic indicator, can this be done or only on price bars?

Reply With Quote
  #489 (permalink)
 dorschden 
Germany
 
Experience: Master
Platform: NinjaTrader
Posts: 112 since Jun 2009
Thanks Given: 59
Thanks Received: 1,143

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.

private DivergenceMode divergenceMode = DivergenceMode.Custom;

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.

Started this thread Reply With Quote
  #490 (permalink)
 2010 
Boston
 
Experience: Advanced
Platform: Ninja Trader
Trading: TF,CL
Posts: 35 since Apr 2011
Thanks Given: 35
Thanks Received: 3



dorschden View Post
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.

private DivergenceMode divergenceMode = DivergenceMode.Custom;

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.

Reply With Quote
Thanked by:




Last Updated on January 7, 2024


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts