NexusFi: Find Your Edge


Home Menu

 





Help using ZigZagUTCSwing in strategy


Discussion in NinjaTrader

Updated
    1. trending_up 2,617 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 1 attachments




 
Search this Thread

Help using ZigZagUTCSwing in strategy

  #1 (permalink)
 Pepperdog 
USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: NQ
Posts: 32 since Aug 2009
Thanks Given: 12
Thanks Received: 58

Hey guys, I think this should be an easy one, I hope, but I am somewhat of a hack with C# so I am having a bit of trouble.

I want to use a swing indicator (ZigZagUTCSwing at the moment, but open to suggestions if there is anything "better") to tell if the last swing high/low was higher or lower than the previous swing high/low. In the ZigZagUTCSwing indicator I see two DataSeries of hi and lo, presumably these are the swing high and low price values that are used by the indicator to determine how/what to plot? There is also a public int variable of direction, either 1 or -1, for the direction of the current zigzag trend. I have not reviewed the code in great detail, but this is how I currently understand it.

If I try to call the hi or lo DataSeries to compare the values in the strategy, I get an error "inaccessible due to its protection level". What does this error mean? So next I try to use the direction variable to determine the swing trend direction, but it appears to me that this variable is *always* 0. This doesn't make any sense, because the direction variable has to change 1/-1 in the ZigZagUTCSwing indicator for it to work!?

Maybe I am just going about this all wrong. All I want my strategy to do is only go long if both the last swing high and low were higher than the previous swing high and low, or go short if both the last swing high and low were lower than the previous swing high and low, excluding double bottoms and double tops (other entry criteria will also apply). Any ideas how I might approach this with ZigZagUTCSwing or some other similar indicator?

I've attached a quick example of what I mean, hopefully it makes sense. (The dots fire when my other entry criteria is met)

Thanks!

Attached Thumbnails
Click image for larger version

Name:	6B 12-09  11_12_2009 (SbSRenko 4 Ticks).png
Views:	416
Size:	87.0 KB
ID:	4459  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Deepmoney LLM
Elite Quantitative GenAI/LLM
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
38 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
GFIs1 1 DAX trade per day journal
19 thanks
The Program
18 thanks
  #2 (permalink)
 
wh's Avatar
 wh 
Neubrandenburg, Germany
 
Experience: Advanced
Platform: R
Trading: Stocks
Posts: 538 since Jun 2009
Thanks Given: 298
Thanks Received: 512


Quoting 
If I try to call the hi or lo DataSeries to compare the values in the strategy, I get an error "inaccessible due to its protection level". What does this error mean? So next I try to use the direction variable to determine the swing trend direction, but it appears to me that this variable is *always* 0. This doesn't make any sense, because the direction variable has to change 1/-1 in the ZigZagUTCSwing indicator for it to work!?

your problem is "private method". there are serval approach to get data. do you know the concept of oo-programming. look for public, protected, private and look also in the ninja-api.

Reply With Quote




Last Updated on November 14, 2009


© 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