Big Mike's Trading Forum
 

Go Back   Big Mike's Trading Forum

> Trading Forums > Platforms and Indicators > NinjaTrader


Notices
     

PriceActionSwing discussion
Started:November 23rd, 2009 (10:23 AM) by dorschden Views / Replies:206,738 / 877
Last Reply:March 19th, 2014 (10:40 AM) Attachments:250

Welcome to Big Mike's Trading Forum.

Welcome, Guest!

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

BMT is 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
 250  
 
Thread Tools Search this Thread

PriceActionSwing discussion

Old November 23rd, 2009, 10:23 AM   #1 (permalink)
Elite Member
Germany (Meck-Pomm)
 
Trading Experience: Advanced
Platform: NinjaTrader
 
Posts: 103 since Jun 2009
Thanks: 38 given, 679 received

PriceActionSwing Information

Any comments and suggestions are welcome!

Please discuss the PriceActionSwing (PAS) indicator in this thread. Any comments or suggestions are more than welcome here. If you have a more private issue send me a PM or better an Email (you'll find the address in the top of the PriceActionSwing.cs script). Discussion about the newest version started here (last update 24.09.2012).

Download PriceActionSwing

Market analyzer template
You can download a market analyzer template in this post. It contains ABC signals, swing trend direction and divergence signals.

Strategy development
In this post you find a strategy sample code snippet which shows how to use the swing trend in a strategy. Start reading at "strategy development".

Versions

The PriceActionSwing calculates swings in different ways and displays all kind of information about the swings above and below them. If you just want to visualize swings then you should use this version.

There is also a PriceActionSwingPro version that contains in addition to the normal version some features which are all off at default. The features are:
- Draw automatically Fibonacci extensions and retracements
- Calculate a swing statistic
- Calculate and visualize ABC patterns
- Risk management (automatically for ABC patterns)
- Calculate and visualize divergence based on an indicator
- Use @gomi's most outstanding cumulative delta work for swings

Settings

Every setting in the NinjaTrades's indicator menu has a short description. Here is a short list of the more important ones.

Parameter:

Double top/-bottom strength:
Represents the double top/-bottom strength. Increase the value to get more double tops and -bottoms.

Swing size:
Represents the swing size. e.g. 1 = small swings and 5 = bigger swings. Which size you use depends on your trading style. There is no best setting for everybody.

Swing type:
Represents the swing type. In the "Standard" swing type a new swing is found when price is above or below the high or low of the last N bars and N = Swing size. The "Gann" type is calculated based on Gann's rules for swings.

Swing values:

Here you can choose which information the swings should display.
Information:
- Duration (in bars)
- Labels (HH, HL,)
- Length (in ticks, points,)
- Percentage (in relation to the last swing. e.g. 100% = DT/DB)
- Time
- Volume (Absolute and relative. Relative is the average volume per bar)

Swing visualization type:
Represents the swing visualization type. Dots | Zig-Zag lines | Dots and lines | Gann style. E.g. if you want only dots to visualize the swings choose "Dots".

Visualize swings/patterns:

Here you can choose your own look and feel for the visualization of the swings and the patterns.

Swing features:

Here you can turn the features on and off.

Statistics:
Swing Length shows the up and down swing length in ticks. The "Last Length" column is the average of the last N swings and N = "Statistic number of swings".

Swing relation for a specific swing (first column) the percentage amount of swings that follow this specific swing. E.g. the values of the first row (Higher High) are:
Swing Count Higher High Lower High Higher Low Lower Low
48 47,9% 52,1% 72,9% 22,9
Then you can interpret this as a Higher High is followed in 72,9% of all cases by a Higher Low and only in 22,9% by a Lower Low. 72,9% + 22,9 % = 95,8%. The remaining amount is for a double bottom.

Risk management:
You can use this feature for to calculate the your trade quantity and see the risk reward ratio and/or you can use it to trade the ABC pattern. Set your trading capital in "Account size" and your risk in "Account risk per trade".

Divergence:

Here you can set all settings to display a 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". Here you find instructions how to create divergence signals based on a freely chosen indicator.

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.

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.

The PAS indicator is very useful to see and trade pure price action with HH, HL in up trends and LL, LH in down trends and you can easily identify swing patterns like M, W, wedged, HS,

New NT7 statistic panel
Please register to view the post attachment(s), image(s), or screenshot(s) - it's simple and free.


Swing labels
Please register to view the post attachment(s), image(s), or screenshot(s) - it's simple and free.



Any comments and suggestions are welcome!

dorschden

Tip

BEST OF TRADING 2011 AWARD

PriceActionSwing was nominated for the Best Indicator Of The Year for 2011, and won 1st place (Gold).

Please register to view the post attachment(s), image(s), or screenshot(s) - it's simple and free.




Tip

BEST OF TRADING 2010 AWARD

PriceActionSwing was nominated for the Best Indicator Of The Year for 2010, and won 3rd place (Bronze).

Please register to view the post attachment(s), image(s), or screenshot(s) - it's simple and free.



You can see all the results here: Best Of Trading 2010 - Big Mike Trading

Attached Thumbnails
PriceActionSwing discussion-6e-06-10-6-range-04.05.2010.png   PriceActionSwing discussion-aapl-13_09_2007-07_05_2010-daily-.png   PriceActionSwing discussion-parameterlist.png  

Last edited by dorschden; December 20th, 2012 at 11:59 AM. Reason: updated the PAS description
Reply With Quote
     
The following 186 users say Thank You to dorschden for this post:
4xmaster, ab456, Abde, adamt, adewes, adrianjm, alexc, Angel, anituchka, anniebee321, ap29680, ArbTrader, Ashtreegambler, astra, autotrader8, aventeren, Barrosco, bdd069, Bernd, beursindex, Big Mike, Blackburn, bluecrow, Bondi9999, Braulio, brwdbill, Buscador, cal1152, capsmart, cazimi, cclsys, charleyfarley, Cheech, ClausZ1, Corman, crisscross, d1david, dakine, DarrenH, DaveTrading, Daytrader999, DAYTRADERPROFESIONAL, dee50, deepakmadan, Denny2009, devdas, djkiwi, djoyce854, dnkhoward2, Donald, drmartell, dwntik5454, ebtrader008, EdgeExecution, emerson, emily28, Eris, EvgenyK, Fat Tails, Felix trader, Forito, Fu510n, fusion, Ganymed, gary9, goldenriver, grahamg, Greendomer95, greentree, gtichauer, hadamkov, Hayles76, iceman4248, indianbuckeye, jacters, Jeff Castille, jethro, jlwade123, jmsUK, Jo Moreau, joe888, JohnnyCash, joobeng, jordis, jtrade, judokamak, jwhtrades, kaltrax, kareem40, KennyK, kingfish88, konsistencia, kvankuren, LA Trader, Lejcus, lincor, LoanShark, loschle, maggtrading, marker, matthew1182, matthoffman, MetalTrade, mikky182, MKaiser, Mtype, MurphyCZek, mystiq, nanobiotech, Nero00, NEXUS851, Nicolas11, nightshift, NJAMC, NoMagic, Obelixtrader, omaha786, Optiondreamer, outerspace, panama, PandaWarrior, panjm, Patrick17, Pepperdog, Peresai, photog53, pip29, project belgrade, psb1967, puma, rainbowchaser, redratsal, resist, rfiske, rickr, Roberto Bnvdz, Ruffcut, Rui S, sandptrader, sebolek1978, seeker, Serninja, sethbutrue, Sezor, Shivaya, Silvester17, SirNicolaus, snakedoctor, snegovik, sola, Sonofapip, stealth38, StefanoR, steveg, sudhirc, Sunil P, Swizzle, tct0909, TheStyg, thomasblake, tony2604, tonybertoni, tornadoatc, Trad3r, trade65, trader2012, traderhas, TradingVictor, trendfly, Turtrend, urghan2, uzzo, Vajce18, Vasilis, vicky2005, Victory Trader, wahn, welly192, wgreenie, whatnext, williamkao, wipca201, wwlacey, wwwingman, Zen Trader, zt379
     

Old November 26th, 2009, 10:39 PM   #2 (permalink)
 Vendor: www.tradersforce.com 
Dallas,tx
 
Trading Experience: Advanced
Platform: Market Delta
Broker/Data: Velocity /TT
Favorite Instrument: ES
 
benbrooke's Avatar
 
Posts: 430 since Aug 2009
Thanks: 216 given, 452 received

Great Job!

I really like it !

i dont know if its possible but can you add the ABCD pattern and fibs to this indicator?

Ban.

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

Old November 26th, 2009, 11:11 PM   #3 (permalink)
Elite Member
Perdido Beach, AL
 
Trading Experience: Intermediate
Platform: graph paper
Favorite Instrument: Guitar
 
websouth's Avatar
 
Posts: 1,141 since Jul 2009
Thanks: 1,081 given, 1,252 received


Nice dorschden
Look here if you are an elite member...http://forum.bigmiketrading.com/elite-circle/1254-swing-temp-order-use-harmonic-patterns-2.html

a combination of the two might be interesting. I cross linked them.

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

Old November 29th, 2009, 12:37 AM   #4 (permalink)
VIP Member
Vancouver, BC
 
Trading Experience: Intermediate
Platform: Ninjatrader
 
Posts: 19 since Aug 2009
Thanks: 7 given, 3 received

Very nice! I have been trying to program an improved swing indicator myself, but this one looks great! How have you been using this in your trading strategy?

Reply With Quote
     

Old November 30th, 2009, 11:33 AM   #5 (permalink)
Elite Member
Germany (Meck-Pomm)
 
Trading Experience: Advanced
Platform: NinjaTrader
 
Posts: 103 since Jun 2009
Thanks: 38 given, 679 received

I uploaded a new version in the download section with Fibonacci retracements, Fibonacci extensions and an visual entry area for the AB=CD pattern.

With NinjaTrader 7 it's easy to set draw objects in the future and with this feature it's possible to visualize the AB=CD pattern in a better way. But for now the Fibonacci tools must reach.

Please register to view the post attachment(s), image(s), or screenshot(s) - it's simple and free.


Please register to view the post attachment(s), image(s), or screenshot(s) - it's simple and free.



websouth View Post
Look here if you are an elite member...

a combination of the two might be interesting. I cross linked them.

I'm not an elite member. When I should add some stuff to PriceActionSwing write this in this thread and I'll see what I can do. Otherwise you can use my code (many comments, I think easy to read) and add some snippets in the other swing indicator.


Dusty909 View Post
How have you been using this in your trading strategy?

For my trading style a good swing indicator is essential. Because I often trade price pattern. Next step is to automate the pattern recognition.

I also create a strategy that trades double bottoms/tops with this indicator. As entry trigger you can use almost everthiny: a stochastic cross, MA cross, 3 bar reversal,... the stop is 2 ticks below the double bottom and profit target is the last swing high or let it run with an atr stop, PSAR, TSSuperTrend. Short vice versa. The results are good, but not extraordinary.

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

Old November 30th, 2009, 08:42 PM   #6 (permalink)
VIP Member
USA
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Instrument: NQ
 
Posts: 32 since Aug 2009
Thanks: 12 given, 52 received

Dorschden,

First off, thanks for this wonderful indicator. I've been working with ZigZagUTC to use in my strategies with little luck (due to my poor c# skills). Your indicator would seem to do exactly what I need with the PriceSwingRelation dataseries.

This is probably a very basic C# question, so pardon my lack of coding knowledge. Can you provide an example of calling this indicator by a strategy to determine the values held in the PriceSwingRelation dataseries?

i.e. if (PriceActionSwing(SwingMode, dtbStrength, span).PriceSwingRelation == #
&& ...
&& ... )
{ do something }

What is the required syntax for the "SwingMode" variable when calling the indicator? I've tried many variations such as "SwingMode.Standard", but no luck yet.

Thanks!

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

Old December 1st, 2009, 06:19 AM   #7 (permalink)
Elite Member
Germany (Meck-Pomm)
 
Trading Experience: Advanced
Platform: NinjaTrader
 
Posts: 103 since Jun 2009
Thanks: 38 given, 679 received

Pepperdog,

you have to add this lines in your strategy

 
Code
#region Using declarations
...
using PriceActionSwing.Utility;
#endregion 

#region Variables
...
private SwingMode pAS_SwingMode = SwingMode.Standard; 
private int pAS_DtbStrength = 15; 
private int pAS_Span = 8; 
#endregion

protected override void Initialize()
{
   …
   // Add the indicator to the chart - not necessary
   Add(PriceActionSwing(pAS_SwingMode, pAS_DtbStrength, pAS_Span));
}

protected override void OnBarUpdate()
{
   …
   // If the last high and  low was higher high and higher low and a short sma cross above the long sma enter long
   if (PriceActionSwing(pAS_SwingMode, pAS_DtbStrength, pAS_Span).PriceSwingRelation[0] == 1 && CrossAbove(SMA(3), SMA(7), 1))
   (
      EnterLong(DefaultQuantity, "");
   )
   ...
}

#region Properties
[Category("Parameters")]
public SwingMode PAS_SwingMode
{
   get { return pAS_SwingMode; }
   set { pAS_SwingMode = value; }
}

[Category("Parameters")]
public int PAS_DtbStrength
{
   get { return pAS_DtbStrength; }
   set { pAS_DtbStrength = Math.Max(1, value); }
}

[Category("Parameters")]
public int PAS_Span
{
   get { return pAS_Span; }
   set { pAS_Span = Math.Max(1, value); }
}
#endregion
For the 1 in "PriceSwingRelation[0] == 1" you can set the following values
-2 for double top
-1 for lower high and lower low
0 nothing
1 for higher high and higher low
2 for double bottom

Hope this helps.

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

Old December 1st, 2009, 02:25 PM   #8 (permalink)
Elite Member
Sydney, NS
 
Trading Experience: Intermediate
Platform: Ninja
Broker/Data: Zen-Fire
Favorite Instrument: TF,S,GC
 
cclsys's Avatar
 
Posts: 607 since Nov 2009
Thanks: 248 given, 348 received

Very good. As to enhancement suggestions (!):

wouldn't it be nice to be able to keep a running average of upswings and downswings and either simply print that out in a stats panel or actually project it onto the chart once a new swing has formed. It would also be nice to keep track of the av number of bars and project the same - esp. good with minute charts.

A further embellishment to the above would be to track upswings in bull markets, downswings in bull mkts, downswings in bear, downswings in bull to better hone the anticipated swings. When the market falls short of a projection it indicates weakness, when greatly exceeds indicates strength, but also helps to provide context of what is likely once a new swing has formed.

Only problem is that with this method of calculating swings there might often be considerable 'lag' between when the swing/high/low formed and the code recognises it as such. But I for one would love to be able to see this on a chart and I think you are more than halfway there with the underlying code.

Reply With Quote
     
The following 3 users say Thank You to cclsys for this post:
     

Old December 1st, 2009, 06:25 PM   #9 (permalink)
Elite Member
Germany (Meck-Pomm)
 
Trading Experience: Advanced
Platform: NinjaTrader
 
Posts: 103 since Jun 2009
Thanks: 38 given, 679 received

Good suggestions and I'm already working on a statistic add on with almost the same stuff you mention. There is the average up-/down swing length and duration in bars and the same for the last x swings. Furthermore I differ this in up trends with higher high/low and down trends. An with this values I plan to visualize an exit area, so it should be possible to enhance the exits.

It is not so much work, but at this moment I'm very busy and next week I'm on vacation. So I can release the statistic primary in some days.

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

Old December 1st, 2009, 07:38 PM   #10 (permalink)
VIP Member
USA
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Instrument: NQ
 
Posts: 32 since Aug 2009
Thanks: 12 given, 52 received


Dorschden,

Thank you very much for the code snippet. I am working on a strategy/dot/bar painter very similar to what you have in your code. It is basically a combination of the triple EMA dots along with PriceSwingRelation from your indicator to further qualify the MA signals (although I have been moving towards using a Jurik MA versus the triple EMA). Only paint/draw a "long" signal after a HH/HL or DB, and "short" signal after LH/LL or DT when the MA changes slope in the direction of PriceSwingRelation. But I have run into an issue, in that sometimes it will paint, sometimes it does not. Attached is a quick example from today's YM. It most certainly could be a problem with my "dots" code, and I will be working with it tonight to try and sort it out. Any suggestions? (I will run some replays and have my code Print the PriceSwingRelation dataseries as the bars and swings form.)

My basic code logic for longs is (opposite for shorts):

if (MA slope changes from falling to rising)
and (PriceSwingRelation > 0)
{ Paint blue Dot / Go Long }

Also, I see an isTrend() around line 426 of your indicator. Can you shed some light on this?

Attached Thumbnails
PriceActionSwing discussion-ym-12-09-12_1_2009-800-volume-.png  
Reply With Quote
     
The following 2 users say Thank You to Pepperdog for this post:
     

Reply



Tags
123, 6e, 9.1, abc, account, account size, accurate, ai, alternative, amp, analysis, asx, ats, audio, audio alerts, automated, automated strategy, automation, average daily volume, axis, backtesting, bar update, bars, basic, beta, big mike, bill williams, bot, breakout, breakouts, c#, calls, cd, cds, ces, change, channel, chart, charts, charttrader, christmas, cl, close, cme, code, coding, color, colors, combination, comparison, compile, complaints, condition, connecting, contracts, control, conversion, convert, corporate, create, crossovers, cumulative delta, currency, currency futures, custom, custom indicator, daily, data, data series, dataseries, day, daytrading, daytrading futures, demand, demo, development, direction, discretionary, displaced, double bottom, double top, dow, downloads, edge, educational, el, elite, ema, enter, entry, eod, equity, error, errors, es, eu, event, exit, extend, extension, fb, fibonacci, file, filled, filter, fix, fold, formula, free, freezing, function, functions, future, futures, fx, ga, gann, gap, gartley, greater than, harmonic, harmonic patterns, harmonic_patterns, high, historical bars, holiday, homework, horizontal, how to, how to trade, if statement, indicator, indicators, indikator, initialize(), instance, interest, iv, jurik, lagging, language, last price, learn, learning, level, line, list, live, load, lot, love, low, management, manual, market, market analyzer, master, math, maximize, median, mental, method, mind, ml, mode, money management, moves, multiple, naked, names, need help, new high, newbie, ninja, ninjatrader, ninjatrader 7, note, notify, nq, nt, nt7, offset, onstartup, open, option, order, override, package, paint bars, pair, parabolic, parameter, parameters, pardo, pat, pattern, patterns, peace, percent, performance, period, personal, pivot, plan, platforms, plot, positions, practice, price, price action, price_action, profit, profit target, profitable, profit_target, program, programmer, project, projection, proprietary, purpose, puts, question, questions, range, range bars, range chart, ray, real time, recognition, relative volume, reliable, reload, renko chart, repainting, replay, research, resistance, retracement, retracements, reverse, risk management, rules, sample, save, scan, script, scripting, scripts, searching, series, session, setstoploss, settings, setup, signal, signals, sim, simple, sim_trading, slope, sma, small, software, sound, source code, sp, speed, split, start, statistical, statistics, stochastics, stocks, stop, stop and reverse, stops, strategies, strategy, strategy development, strategy wizard, strength, string, supply, support, support resistance, swing, swing trading, switzerland, syntax, system, systems, ta, targets, tax, technical, template, testing, thank you, tick, ticks, tile, time, trade, trader, trades, trading, trading strategy, trading system, trading videos, trend, trend following, type, update, values, variable, vendor, vision, volatility, volume, vsa, webinars, windows, xml, ym, zigzag, zigzagutc, zone
     

Big Mike's Trading Forum > Trading Forums > Platforms and Indicators > NinjaTrader > PriceActionSwing discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT -4. The time now is 03:33 AM.

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2014 by Big Mike Trading. 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 2014-04-25 in 0.24 seconds with 20 queries on phoenix via your IP 54.205.59.78