PriceActionSwing discussion (Page 91) - 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:391,846 / 1,345
Last Reply:10 Minutes Ago (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 May 30th, 2014, 05:24 PM   #901 (permalink)
Market Wizard
Sarasota FL
 
Futures Experience: Intermediate
Platform: NinjaTrader, Sierra Chart
Favorite Futures: ES, CL
 
Posts: 3,471 since Jan 2013
Thanks: 24,883 given, 10,554 received
Forum Reputation: Legendary


Rachel View Post
Hi and thank you to the creator and others, who helped to create this wonderful indie.

I was trying to write a strategy and ran into a problem.

Had Ninja Trader tech fix the problem but on any upgrade, this is the issue:

"The enumeration in the PriceAction indicators SwingTypes, using it's own namespace. This prevents it from being called from another indicator or strategy."

It would be helpful, if that issue could be addressed. I was trying to get a strategy using the PASOscillator: in volume mode for rising and falling and it caused a error etc.

Thank you again,

Rachel

Hi Rachel,

This is not just a simple programming error to be addressed. Putting the enumeration in its own namespace solves or prevents a very important and common problem with other indicators.

To step just a little bit into techie territory (sorry, I'll be brief ):

1. An "enumeration" (or "enum") is a programming thing that can only have a value specified in a list. For example, when you click on a drop-down box labeled "MA Type" in an indicator's settings, and see choices like "SMA" and "EMA", that's an enumeration. You have only the listed choices, and you have to select one. They're handy things.

2. Names like "MAType" are real common in indicators. In the PAS indicator, there's an enumeration called "SwingType". That's going to get used by another indicator eventually, too.

3. If programmers put all the enumerations for their indicators in separate "namespaces", then it doesn't matter that another indicator is using the same name; there cannot be a conflict with enums having the same names because the names don't live in the same place, so to speak.

4. If programmers put them in the common ("global") namespace, then there will eventually be a conflict. For example, if you already have an indicator that uses an enum named "MAType" (pretty common), and if you then download another indicator that also uses the enum name "MAType", and if they both place their enums in the common namespace, you will find the new indicator can't be imported. The two indicators simply cannot coexist on the same computer. You also see this in new versions of the same indicator.

The only way to fix this problem is for someone who knows the issue to go into one or the other indicator and hack it to eliminate the name conflict. But only after some gnashing of teeth and intemperate words by the user.

Now, I guess you had the same gnashing and so on when you were trying to get your strategy to use PriceActionSwing, until you could find someone to fix it. The problem you had was that the strategy could not access the SwingType enum, which was isolated in its own namespace, basically to prevent its overlapping into another indicator's or strategy's space.

So basically, "fixing" it so your issue would be eliminated would open it up to the other issue of potential conflict with other indicators. Neither of these are good, but you have to pick one or the other. That's why this isn't a simple error to be repaired; it's a design decision that means you avoid one problem but may end up with the other.

I assume that when support fixed the problem for you, they put the SwingType enum into the common global namespace. That fixed one issue, but it also means that if you download another indicator that uses an enum called "SwingType", and if it also places it in the global namespace, you will have a conflict between them, which will have to be fixed by someone.

Life ain't fair, but there it is.

I hope this post didn't go on for too long or wasn't clear. It's hard to explain this stuff sometimes, but it's good to know why something happens, and the pro's and con's of changing it, and whether it's actually an error.

At least, I hope all this now makes more sense to you.

Bob.

Reply With Quote
     
The following 13 users say Thank You to bobwest for this post:
     

Old May 31st, 2014, 05:36 AM   #902 (permalink)
Elite Member
Nîmes France
 
Futures Experience: Intermediate
Platform: NinjaTrader, Mt4
Broker/Data: NinjaTrader Brokerage
Favorite Futures: Oil
 
Posts: 44 since Nov 2010
Thanks: 80 given, 13 received

Thanks

Thanks Bob

Excellent explanation it seems to me.
It raises the question of why NT doesn't give each indi (instance)
its own namespace.
Would there be any disadvantages to that, beyond perhaps memory
hogging ?
Sezor

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

Old May 31st, 2014, 07:01 AM   #903 (permalink)
Market Wizard
Sarasota FL
 
Futures Experience: Intermediate
Platform: NinjaTrader, Sierra Chart
Favorite Futures: ES, CL
 
Posts: 3,471 since Jan 2013
Thanks: 24,883 given, 10,554 received
Forum Reputation: Legendary



Sezor View Post
Thanks Bob

Excellent explanation it seems to me.
It raises the question of why NT doesn't give each indi (instance)
its own namespace.
Would there be any disadvantages to that, beyond perhaps memory
hogging ?
Sezor

The namespace is purely a programming issue. There are no memory implications, really. It's not "space" in that sense; it's more like whether a program can see a value or not.

Normal programming practice outside of NT would generally be to keep namespaces separate, to avoid possible name conflicts. In writing indicators, a programmer certainly can create a separate namespace for his/her enums, and @dorschden , the original programmer of PAS, did that. I think this is usually the better way to go.

Rachel's issue shows that there may be advantages to making them available to other strategies/indicators if you want to be able to use an indicator in another indicator or a strategy, for example, which NT does let you do.

But then the other side of the two-edged sword cuts you.

As to how to avoid both issues, from a programmer's standpoint that's easy: you keep the namespaces separate and you add the namespace name to your "using" statements (sorry, more technicalese, for the programming community ) in the indicator/strategy that you want to access it. (You have to add it to the "using" statements in the indicator that it's written for, too, which PAS does.)

From a design viewpoint for NinjaTrader, where you want a non-programmer user to easily incorporate an indicator into another, it's not so easy to see how to do it. I believe that the native NT indicators all use the global namespace for enums -- in any case, that's the practice they encourage (per the comment Rachel got from Ninja support) -- I assume because it's an easy way to allow sharing them.

As I said, these are design issues, and you make choices to get what you want, recognizing there are tradeoffs.

Bob.


Last edited by bobwest; May 31st, 2014 at 07:47 AM.
Reply With Quote
     
The following 4 users say Thank You to bobwest for this post:
     

Old June 4th, 2014, 10:04 PM   #904 (permalink)
Elite Member
Germany (Meck-Pomm)
 
Futures Experience: Advanced
Platform: NinjaTrader
 
Posts: 107 since Jun 2009
Thanks: 50 given, 934 received

Q&A

Time for a little Q&A.

But first I want to thank @Silvester17 for answering a lot of questions in this thread and @Tasker_182 for answering some coding questions and requests. I really appreciate it a lot!


CaptainFill View Post
I had an older version of the PAS and it had triangle pattern formations which would display bold lines (green or red) and a continuation expectation arrow soon after the pattern had formed.

It doesn't look to me like that feature is available anymore in the latest version and found its function to be very interesting and would like to explore that more.

If you mean the AB=CD pattern, then use the PriceActionSwingPro version and set in the (Swing) Feature category the setting "ABC Pattern" to "Long_Short".


Raj1 View Post
SWING ENTRY SOUND ALERTS FOR FOLLOWING SWINGS:

1. DT Short Entry
2. DB Long Entry
3. HL swing Long entry
4. LH swing Short Entry
5. Regular Divergence Long Entry
6. Regular Divergence Short Entry
7. Hidden Divergence Long Entry
8. Hidden Divergence Short Entry

This alerts are implemented in the new version.


Raj1 View Post
With my UniRenko Candles and MACD BBlines oscillator(12,26,9), the RD/HD lines are getting drawn between almost all swing HHs & LLs and does not reflect true divergences. I am not sure why that is occurring to me. However, with my another RD/HD indicators viz., ECIDiv_v4 that is available in futures.io (formerly BMT) gives me correct indications as per following logic. Hence, I request you to review your code for possible correction, if any.:
LOGIC:
Regular Divergence Short Signal: @ PRICE HH swing when MACD oscillator has LH swing
Regular Divergence Long Signal : @ PRICE LL swing when MACD oscillator has HL swing
Hidden Divergence Short Signal: @ PRICE LH swing when MACD oscillator has HH swing
Hidden Divergence Long Signal : @ PRICE HL swing when MACD oscillator has LL swing

The divergence in the PAS is spotted exactly after this rules and I believe they work correctly.


Keithh View Post
Could a coding whizz add these features:

In the parameters section - the ability to set separate left and right swing sizes.
Eg: a swing point is created with 5 bars on the left side of price and 2 bars to the right of the swing point.

Stop the indicator showing a dot above/below the current live bar, and have it only show when a swing point has formed.

Add the ability to offset the dots/symbols from the price bar

Sorry, I don't will implement this requests. Maybe somebody else will do it.


tradermick View Post
I am looking for a way to have the swing label colors simply be the same color as its related zigzag swing. Red text for a downswing label, green text for an upswing label. (Or whatever colors have been chosen for up/downswings)

In the new version you can set the color for each swing type separately, so you can set e.g. the colors for high swings to the same color as the color of the zig zag lines.


tradermick View Post
… My request is, I would also like to see the Delta activity during the time in between the CD changes driven by the swing updates.
[…]
This way, we could see the net Delta activity during periods of sideways price movement when new swing extremes are not being established…

Check out the new version. But you have to uncomment all the "GomCD" regions in the code and compile the script again first. You find this under the setting "gomCDCurrent".


Keupie View Post
Would it be possible to allow a trader to plot Swing Values of the current session only. That way the left side of your screen stays clean.

This is possible, but you or somebody else have to code it. You simple check if you are in the current session and if not skip the draw statements.


buylosellhi View Post
[…] is this price action indicator available for Tradestation […] ?


humseper View Post
Is it possible to use the PAS indicator with sierra chart?


kevinflynn View Post
Please can you convert this great indicator to Metatrader 4 […]


hlatham View Post
No doubt a long shot, but has anyone converted this or written an indicator like this to work on CQG?

The PAS indicator is only available for NinjaTrader. I have a MT4/MT5 version but I'll probably don't make it public.


podski View Post
[…] The thing about a HL or an LH is that it get's cancelled out by the next HL or LH. They may even become HH or LL in fact.

I would like to be able to choose an option that keeps a record of the prints of HL and LH so that I can see where the first indication occurred and how it developed after that. […]

It is possible to track the swing development rather easily but you have to code it yourself or find somebody else. If you just want a triangle to draw when the first indication was, you can use the "swing switch" setting in the new PriceActionSwingPro version. And in the code you give the draw statements a unique tag id. You would change "DrawTriangleDown("DnSwingStart", false, 0 ..." to "DrawTriangleDown("DnSwingStart" + swingLow.Counter, false, 0 ..." and the same for the up triangle. Just search the code for this statements, change them and compile them and you are have what you wanted.


Rachel View Post
[…]I was wondering if there was a way to get a sound alert when the Gann Swing turns direction?
It is a great indicator of when a swing is about to change, especially if you are watching it from a higher time frame. […]

Use the "swing switch" alert in the new PriceActionSwingPro indicator.


supermht View Post
can anyone add the function of calculating swing time/points by close? currently the indicator calculates swing time/points by High and Low. thanks


YertleTurtle View Post
I too would like this addition - close to close swings and the ability to define swings by tick size.


Trafford View Post
Please can you confirm if the PASPro indicator's can be modified to plot a new swing based on a close higher and for a swing low on a close lower and higher low on a close candle the same for a lower high swing.

The new version can also calculate the swing based on the close values and calculate the swings based on ticks. Check the "Parameter" category.


supermht View Post
i am wondering if any code experts could add swing calculation of average volume by duration. thanks

You can do this rather easily by yourself. In the new version change the file PriceActionSwingBase add at the end of the "CalcDnSwing" function a similar "DrawText" statement like all the other output text statements. You can copy an existing one and just give it a different tag name and change the output to e.g. "(swingHigh.CurVolume/swingHigh.CurDuration).ToString()". Do the same for the CalcUpSwing function. Something like this should work.


OpalDragon View Post
[…] is there a way to change it so it displays the Price and Ticks - ONE over the Other […]

The new version has an extra price output.


KrazyTrader View Post
Is it possible to set the indicator to have price on the swing line?[…]

No, this setting isn't supported.


sudhirc View Post
Is it possible to modify this script to include volume divergence in here. […]

Which rules do you have in mind?

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

Old June 4th, 2014, 10:05 PM   #905 (permalink)
Elite Member
Germany (Meck-Pomm)
 
Futures Experience: Advanced
Platform: NinjaTrader
 
Posts: 107 since Jun 2009
Thanks: 50 given, 934 received

New version

Futures Edge on FIO

Are you a NinjaTrader user?

 
A new version is ready.

But @Big Mike has to upload it first. Once he has done that, he'll probably post a message here in the thread and then you can check out the updated version.

Download PriceActionSwing

I Changed the code structure - so if you use it in strategies or in other indicators, make sure you have a copy of the old version. With the new code structure it is easier to use the swing functions and values in strategies or other indicators.
Added swing tick and swing percentage calculation.
Added swing calculation based on close values.
Added different alerts.
Added risk management tab.
Added, changed and improved some other things.

I didn't tested it extensively, but I expect everything to work.

Comments, errors and suggestions are welcome!

The alert sound files are attached in a 7z archive. Extract and put them in "C:\Program Files (x86)\NinjaTrader 7\sounds".

The market analyzer output hasn't changed, but you have to use the new template to get all the settings of the PAS indicators. Put the market analyzer template in "C:\Users\user name\Documents\NinjaTrader 7\templates\MarketAnalyzer".

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Attached Files
Register to download File Type: xml PasMA.xml (73.5 KB, 625 views)
Register to download File Type: 7z AlertSoundFiles.7z (272.2 KB, 524 views)
Reply With Quote
     

Old June 4th, 2014, 10:52 PM   #906 (permalink)
Elite Member
Portland, USA
 
Futures Experience: Intermediate
Platform: Ninjatrader
Favorite Futures: ZS
 
YertleTurtle's Avatar
 
Posts: 210 since May 2011
Thanks: 41 given, 337 received


dorschden View Post
Time for a little Q&A.

Thanks a ton for making these changes - this indy is getting really awesome!

And the day came when the risk to remain tight in a bud was more painful than the risk it took to blossom

- Anais Nin
Reply With Quote
     
The following user says Thank You to YertleTurtle for this post:
     

Old June 5th, 2014, 06:15 AM   #907 (permalink)
Elite Member
San Diego
 
Futures Experience: Advanced
Platform: Private
Broker/Data: private
Favorite Futures: CL future
 
Rachel's Avatar
 
Posts: 1,380 since Mar 2012
Thanks: 935 given, 1,947 received

Thank you SOOOO MUCH!

Can't wait to try out the new version, I am so looking forward to it.
You are great!!!

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

Old June 5th, 2014, 12:33 PM   #908 (permalink)
Market Wizard
Chicago Illinois USA
 
Futures Experience: Advanced
Platform: Ninja Trader
Broker/Data: IB
Favorite Futures: duh hammer!
 
wldman's Avatar
 
Posts: 2,055 since Aug 2011
Thanks: 966 given, 2,566 received
Forum Reputation: Legendary

Wow...

@dorschden
@Silvester17

This is an amazing piece of work. I have been the blind squirrel on this so thanks for whipping a nut at me!

This what I downloaded is the "old" version, do I have that right? Mike will notify when the "new" one is in the downloads section? I can add anaKVO to the Divergence piece?

Wow Santa, I hope you liked the cookies and beer I left for you. Thanks guys.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Last edited by wldman; June 5th, 2014 at 12:35 PM. Reason: add pic
Reply With Quote
     
The following user says Thank You to wldman for this post:
     

Old June 5th, 2014, 12:39 PM   #909 (permalink)
Market Wizard
Columbus, OH
 
Futures Experience: None
Platform: NT-9G, TOS
Favorite Futures: ES
 
Silvester17's Avatar
 
Posts: 3,229 since Aug 2009
Thanks: 4,424 given, 9,887 received


wldman View Post
@dorschden
@Silvester17

This is an amazing piece of work. I have been the blind squirrel on this so thanks for whipping a nut at me!

This what I downloaded is the "old" version, do I have that right? Mike will notify when the "new" one is in the downloads section? I can add anaKVO to the Divergence piece?

Wow Santa, I hope you liked the cookies and beer I left for you. Thanks guys.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

yes, yes (hopefully soon) and yes

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

Old June 5th, 2014, 12:55 PM   #910 (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,540 since Jun 2009
Thanks: 28,884 given, 80,126 received


Updated, notifications sent.

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
     
The following 11 users say Thank You to Big Mike 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 10:21 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-04 in 0.19 seconds with 20 queries on phoenix via your IP 54.158.84.38