PriceActionSwing discussion (Page 50) - NinjaTrader | futures.io
futures.io futures trading
 

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader


PriceActionSwing discussion
Started:November 23rd, 2009 (11:23 AM) by dorschden Views / Replies:392,211 / 1,345
Last Reply:December 4th, 2016 (10:10 PM) Attachments:423

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.


You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike
     

Reply
 423  
 
Thread Tools Search this Thread

PriceActionSwing discussion

Old July 24th, 2012, 11:28 AM   #491 (permalink)
Elite Member
cordoba spain
 
Futures Experience: Intermediate
Platform: ninjatrader
Favorite Futures: 6E
 
dee50's Avatar
 
Posts: 72 since Feb 2011
Thanks: 77 given, 38 received

Many, Many Thanks


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.

Thank you, now I understand, great instructions, easy to follow.

AND, Thank you for a great Indi, definitely one of the best, I hope people realize and appreciate the vision that is needed to create such a thing of beauty. Dali and Picasso donīt come close!!!

Reply With Quote
     
The following user says Thank You to dee50 for this post:
     

Old July 26th, 2012, 09:08 AM   #492 (permalink)
Elite Member
London, UK
 
Futures Experience: Beginner
Platform: NinjaTrader, IB TWS
Broker/Data: IB, Kinetic
Favorite Futures: Stocks, Forex
 
Posts: 96 since Nov 2011
Thanks: 47 given, 16 received

Hello dorschden,

There was a question I asked a while ago, which was kindly answered to some extent by others as you did not seem to be around then. I would like to post the question again for your answer please if I may. Link to original post below:

https://futures.io/ninjatrader/1272-priceactionswing-discussion-42.html#post213719

What I am basically trying to use your indi for is to try and emulate Timothy Ord's (if you have heard of him) volume chart. Basically comparing the the volume of one swing to the next in terms of percentage.

Many thanks.

Dan

Reply With Quote
     

Old July 26th, 2012, 09:47 AM   #493 (permalink)
Elite Member
detroit,mi
 
Futures Experience: Beginner
Platform: NT
Favorite Futures: NQ
 
sudhirc's Avatar
 
Posts: 265 since Sep 2011
Thanks: 1,274 given, 285 received


dorschden,
Thank you for the great indicator and detailed instructions to conficure divergences for custom indicator. (was able to do that for TSI).

Trying to configure for GomCD, I'm having difficulty. I thought i removed all comments as per the instructions on first page, but still could not get the GomCD numbers in there. Can some one please post .cs file with the changes to GomCD?.

Thank you,
sudhirc



GomCD:

To use cumulative delta for the swings or divergence you have to uncomment all GomCD regions in the source code. Press "ctrl + F" or the "Find/Replace" button and search for "region GomCD" and uncomment all the regions and compile it. Of course you have to install the Gom package before.

Reply With Quote
     
The following 2 users say Thank You to sudhirc for this post:
     

Old July 26th, 2012, 04:01 PM   #494 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 45,543 since Jun 2009
Thanks: 28,886 given, 80,130 received

Just a reminder - do not post Gom stuff in this thread, because this is not an Elite thread.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
     

Old July 26th, 2012, 04:23 PM   #495 (permalink)
Elite Member
detroit,mi
 
Futures Experience: Beginner
Platform: NT
Favorite Futures: NQ
 
sudhirc's Avatar
 
Posts: 265 since Sep 2011
Thanks: 1,274 given, 285 received

sorry.

Futures Edge on FIO

Are you a NinjaTrader user?

 

Big Mike View Post
Just a reminder - do not post Gom stuff in this thread, because this is not an Elite thread.

Mike

Sorry, did not realise this.

If willing can post GomCD comments removed that can be used price action indicator at https://futures.io/elite-circle/6802-gomrecorder-2-a-91.html (GomCDRecorder2 forum under elite section)

Thankyou.


Last edited by sudhirc; July 26th, 2012 at 05:00 PM.
Reply With Quote
     
The following user says Thank You to sudhirc for this post:
     

Old July 31st, 2012, 05:30 PM   #496 (permalink)
Elite Member
Cincinnati + OH/USA
 
Futures Experience: Intermediate
Platform: Ninjatrader, Bloomberg
Favorite Futures: Stocks
 
Posts: 1 since Jul 2012
Thanks: 5 given, 0 received

Market Analyzer Divergence & Diverggence Signal

Hey all -
I could use a little help in understanding how the market analyzer template (PasMa2) sets its Plot = DivergenceSignals. Does the MarketAnalyzer template file have to be manually edited to set the Plot to "DivergenceSignals" or can this be accomplished via the properties window? Further, where did the plot variable "DivergenceSignals" come from? I don't see it in the indicator properties. Clearly I'm confused.

Second, I was wondering if someone could suggest some ways to capture the PriceActionSwingPro's "rDiv" or "hDiv" signals in a strategy. I would like to use the "rDiv" Signals as a Setup or pre-condition necessary before a signal can generate an order.

One idea I have started is to create a public boolSeries variable, bullDivSetup and bearDivSetup. Since MarketAnalyzer can capture Divergence signals I feel like I'm duplicating functionality that already exists. That said, here's where I set values for each BoolSeries:
 
Code
protected override void OnBarUpdate()
...
#region Divergence
...
if (showDivergenceRegular == true)
{
	if (divLastSwing < divCurSwing && divLastOscValue > divCurOscValue)
	{
		...
		DrawLine("DivSignalDn" + drawTagDivDn, AutoScale,
			CurrentBar - lastHighBar, lastHigh, CurrentBar - curHighBar,
			curHigh, divDnLineColour, divDnLineStyle, divDnLineWidth);
		int textDivBarAgo = Convert.ToInt32(CurrentBar -
			(lastHighBar + curHighBar) / 2);
		...
		//////////////////////////////
		//Bearish Divergence Setup
		//////////////////////////////
		bearDivSetup.Set(true);
	}
	else
	{
		RemoveDrawObject("DivSignalDn" + drawTagDivDn);
		RemoveDrawObject("DivRegTextDn" + drawTagDivDn);
	}
}

...
if (showDivergenceRegular == true)
{
	if (divLastSwing > divCurSwing && divLastOscValue < divCurOscValue)
	{
		
		...
		DrawLine("DivSignalUp" + drawTagDivUp, AutoScale,
			CurrentBar - lastLowBar, lastLow, CurrentBar - curLowBar,
			curLow, divUpLineColour, divUpLineStyle, divUpLineWidth);
		int textDivBarAgo = Convert.ToInt32(CurrentBar -
			(lastLowBar + curLowBar) / 2);
		...
		///////////////////////////
		//Bullish Divergence Setup
		///////////////////////////
		bullDivSetup.Set(true);
	}
	else
	{
		RemoveDrawObject("DivSignalUp" + drawTagDivUp);
		RemoveDrawObject("DivRegTextUp" + drawTagDivUp);
	}
}

Any help / thought would be greatly appreciated. Also let me know if you need me to clarify.

Reply With Quote
     

Old August 7th, 2012, 10:15 AM   #497 (permalink)
Elite Member
Germany (Meck-Pomm)
 
Futures Experience: Advanced
Platform: NinjaTrader
 
Posts: 107 since Jun 2009
Thanks: 50 given, 934 received


danjuma View Post
There was a question I asked a while ago, which was kindly answered to some extent by others as you did not seem to be around then. I would like to post the question again for your answer please if I may.

1. What the volume value refers to, is it the total volume (or average volume) from one swing high/low to another?

2. With regards to the percentage, percentage of what? Is it the percentage of the current volume compared to the previous volume or to the average daily volume or what?

@danjuma,

The swing high volume number represents the absolute or relative volume traded from the swing low to the swing high or vice versa. If you choose "absolute" you see the complete volume for this swing and if you choose "relative" then you see the average volume traded at each bar in this swing up.

The percentage number doesn't belong to the volume analysis. It's the percentage retracement number for the swing length. E.g. if a swing down is 10 ticks long and the next swing up is 7 ticks the retracement is 70% and if the swing up has 17 ticks the retracement/extension is 170%.

To compare the volume of the swings in a percentage way you have to change the source code to calculate and print the volume retracement for each swing. As example how you can do this see how the swing length is calculated in the source code.


sudhirc View Post
Trying to configure for GomCD, I'm having difficulty. I thought i removed all comments as per the instructions on first page, but still could not get the GomCD numbers in there.

@sudhirc,

I hope you figured it out by now. If you completely uncomment all GomCD regions in the source code it'll work. I didn't here any other complaints about this. Otherwise write me a short private message.


AlgoBot View Post
I could use a little help in understanding how the market analyzer template (PasMa2) sets its Plot = DivergenceSignals. Does the MarketAnalyzer template file have to be manually edited to set the Plot to "DivergenceSignals" or can this be accomplished via the properties window? Further, where did the plot variable "DivergenceSignals" come from? I don't see it in the indicator properties. Clearly I'm confused.

Second, I was wondering if someone could suggest some ways to capture the PriceActionSwingPro's "rDiv" or "hDiv" signals in a strategy. I would like to use the "rDiv" Signals as a Setup or pre-condition necessary before a signal can generate an order.

@AlgoBot,

You don't have to edit the MA template. The MA template is already set to "Plot" = "DivergenceSignals" as you can see under -> Right click in the Market Analyzer -> Columns… -> Bottom Left window choose the last PriceActionSwing instance -> Right window in the category "indicator" -> Plot = DivergenceSignals.

The "DivergenceSignals" is a public data series in the PriceActionSwing indicator to give access to the divergence signals. Simply create an PriceActionSwing instance in your indicator/strategy and call the DivergenceSignals series and save the values in your own data series. E.g. (better implementation would be to use OnStartUp, but to keep it simple):

 
Code
			
#region Using declarations

using PriceActionSwing.Utility;

#region variables
        
private int swingSize 7;
        private 
SwingTypes swingType SwingTypes.Standard;
        private 
int dtbStrength 15;
        private 
IDataSeries divSignals;

        protected 
override void OnBarUpdate()
        {
    if (
CurrentBar 1)
            {
                if (
divSignals== null)
                    
divSignalsPriceActionSwing(InputdtbStrengthswingSizeswingType).DivergenceSignals;
            }

    
// divSignals represents now the divergence signals from the PriceActionSwing indicator
    
if (divSignals[1] == -2)
    {
        
// hidden divergence short
        // do something
    
}

DivergenceSignals:
-4 = hidden divergence short entry |
-3 = regular divergence short entry |
-2 = hidden divergence short signal |
-1 = regular divergence short signal |
0 = no signal |
1 = regular divergence long signal |
2 = hidden divergence long signal |
3 = regular divergence long entry |
4 = hidden divergence long entry |

Reply With Quote
     
The following 8 users say Thank You to dorschden for this post:
     

Old August 11th, 2012, 09:49 AM   #498 (permalink)
Trading Apprentice
Frankfurt
 
Futures Experience: Intermediate
Platform: TradeStation
Broker/Data: Zen-Fire
Favorite Futures: ES
 
Posts: 3 since Nov 2011
Thanks: 3 given, 0 received

@sudhirc,
did you check the area between CD or do you just follow the standard approach?

Reply With Quote
     

Old August 12th, 2012, 01:36 PM   #499 (permalink)
Elite Member
detroit,mi
 
Futures Experience: Beginner
Platform: NT
Favorite Futures: NQ
 
sudhirc's Avatar
 
Posts: 265 since Sep 2011
Thanks: 1,274 given, 285 received


jacters View Post
@sudhirc,
did you check the area between CD or do you just follow the standard approach?

@jacters

Hi Jacters, I'm not sure what you mean. can you eloborate!

thank you,
Sudhir

Reply With Quote
     

Old August 17th, 2012, 04:15 AM   #500 (permalink)
Elite Member
Czech Republic
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Ninja/ Continuum
Favorite Futures: Anything that move
 
Lejcus's Avatar
 
Posts: 43 since Apr 2010
Thanks: 216 given, 62 received

Improvement tip


Hi dorschden

Thanks for your hard work on this indicator and your sharing.

I found one small thing missing in this complete work. The duration of swings is shown in number of bars which is fine for some, but for us using range or tick charts would be useful to see duration in minutes. I know that you can show time of the swing already, but this isn't comfortable to read without : separator between.

Would you consider adding option to show duration in time in further versions? Also using : separator in time would be nice.

Thanks

Reply With Quote
     
The following 4 users say Thank You to Lejcus for this post:
     

Reply



futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > PriceActionSwing discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

NinjaTrader 8: Features and Enhancements, Tips and Tricks

Dec 6
 

Al Brooks: Stop Losing when a Good Trade goes Bad, Correcting Mistakes

Elite only
 

Trading Technologies: Algo Design Lab hands-on

Dec 13
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Murray Math Discussion? jwhtrades Traders Hideout 5 July 27th, 2011 10:06 PM
Looking for general discussion thread. jctrader Traders Hideout 2 May 2nd, 2011 03:23 PM
PriceActionSwing jeff92887 NinjaTrader 2 March 1st, 2011 07:15 AM


All times are GMT -4. The time now is 03:51 PM.

Copyright © 2016 by futures.io. 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.
 
no new posts

Page generated 2016-12-06 in 0.20 seconds with 20 queries on phoenix via your IP 54.161.157.73