NexusFi: Find Your Edge


Home Menu

 





Swing Hi/Lo points for indicator values?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one zacharydw00 with 5 posts (1 thanks)
    2. looks_two sam028 with 3 posts (0 thanks)
    3. looks_3 max-td with 2 posts (0 thanks)
    4. looks_4 Trader.Jon with 2 posts (0 thanks)
    1. trending_up 12,306 views
    2. thumb_up 7 thanks given
    3. group 13 followers
    1. forum 18 posts
    2. attach_file 3 attachments




 
Search this Thread

Swing Hi/Lo points for indicator values?

  #1 (permalink)
 
zacharydw00's Avatar
 zacharydw00 
Idaho
 
Experience: Intermediate
Platform: NinjaTrader,ToS
Broker: Amp Futures, ToS
Trading: ES, E7, CL, GC
Posts: 149 since Aug 2009
Thanks Given: 87
Thanks Received: 180

Any one know of an indicator or code that will identify the Swing Hi/Lo points of an indicator's output value? NT's Swing indicator uses the High & Low functions, which can't be applied to an ind. value. Thanks.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
25 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
22 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #3 (permalink)
 
hondo69's Avatar
 hondo69 
Austin, TX
 
Experience: Intermediate
Platform: NinjaTrader
Trading: Currencies
Posts: 162 since Jun 2009
Thanks Given: 57
Thanks Received: 248


Several times I worked to develop such a code without success. So I dug deeper into the code that creates Swing Hi/Lo points and then compared it to other platforms.

I was quite surprised to find NT calculates these points much differently than TradeStation, for example. Seems to me the key is to rewrite the original NT code such that it calculates pivots in a more simplified fashion. Then use that new code as a basis from which an indicator can be constructed that will "remember" these points for use as output values.

Reply With Quote
  #4 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

hi zach...
it is possible to check Swing Hi/Lo points of indicators say like stochastic, but only with costume coding - not as simple indicator on indicator-function.
maybe we will see this in NT 7 now.

i played with this a while ago ago - dont remember exactly how ....

if i find it i will post an example how i did this / tried this.

max-td
Reply With Quote
  #5 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

found it - have a look at this :

 
Code
                            


 double myswinghigh 
=  Swing  (  Stochastics(  714,  4  )  ,  2  )  .SwingHigh 0] ; 
           
 
double myStoch =  Stochastics(  714,  4   )   K  [0] ; 
           

             if  
                (

                
myStoch >   myswinghigh    &&     myswinghigh 50

                

i took stochastics and used it as the input for the NT-Swing-H / L -indicator (.SwingHigh-dataseries here)
of course this is no example for visualisation / plotting now but for a first idea how to use it and for condítionbuilding.

first line calculates the last small Swing-High from stochastic.K
second line = stochastic.K
logic- line : checks if stochastic.K itself breaks its last swing-high AND all is happening above 50 (means in the upper half)

it describes a check for a HigherHigh in stochastic.K so to say.

hope that makes sense.

.

max-td
Reply With Quote
  #6 (permalink)
 
Reggy's Avatar
 Reggy 
Brooklyn, New York
 
Experience: Intermediate
Platform: Sierra Charts, NinjaTrader, mt4, oanda, some multicharts
Broker: cms forex
Trading: currency futures, forex
Posts: 18 since Apr 2010
Thanks Given: 22
Thanks Received: 37

This might seem clumsy, but it might work. For example, to find the swing high of a 55 period Stochastics:
55sto<55sto.1
55sto.1<55sto.2
55sto.2<55sto.3
55sto.3<55sto.4
55sto.4<55sto.5
55sto.5>55sto.6
55sto.6>55sto.7
55sto.7>55sto.8
55sto.8>55sto.9
55sto.9>55sto.10

Which shows how little I know about this stuff. Just started looking at Ninjatrader a couple of days ago, and trying to learn stuff. Bye the way, I am impressed with Ninjatrader forum support...I posted an intellisense question with the wizard code and got an answer in 5minutes!

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
 
zacharydw00's Avatar
 zacharydw00 
Idaho
 
Experience: Intermediate
Platform: NinjaTrader,ToS
Broker: Amp Futures, ToS
Trading: ES, E7, CL, GC
Posts: 149 since Aug 2009
Thanks Given: 87
Thanks Received: 180

Thanks for the suggestions guys. I'll check some of your ideas, but first I have to fix a broken irrigation line before the grass dies. I'll post my results as soon as I get back to testing these ideas.
Thanks.

Started this thread Reply With Quote
  #8 (permalink)
 
jcar's Avatar
 jcar 
allentown
 
Experience: Advanced
Platform: Ninjatrader, Tradestation
Broker: zen-fire
Trading: 6e,cl
Posts: 10 since Apr 2010
Thanks Given: 1
Thanks Received: 12


zacharydw00 View Post
Any one know of an indicator or code that will identify the Swing Hi/Lo points of an indicator's output value? NT's Swing indicator uses the High & Low functions, which can't be applied to an ind. value. Thanks.

Did you ever find away to program the swing high low indicator so that you can implement it in a trading stradegy?

Visit my NexusFi Trade Journal Reply With Quote
  #9 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,629


jcar View Post
Did you ever find away to program the swing high low indicator so that you can implement it in a trading stradegy?

If you mean a strategy using the Swing built-in indicator, it's easy, something like:
 
Code
                            
if (Close[0] > Swing(5).SwingHigh[0]) {

  
Golong();
  
etcetc, ...
}
if (
Close[0] < Swing(5).SwingLow[0]) {
  
GoShort();
  
etcetc, ...


Success requires no deodorant! (Sun Tzu)
Follow me on Twitter Reply With Quote
  #10 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184


Sam,

Any thoughts on how to use (code) previous swing levels as profit targets ? I am thinking on as momentum stays above a certain level, then the profit target keeps moving from previous swing level to the next profitable swing level, and then as ROC falls the profit target drops to the price as market order.

Jon

Reply With Quote




Last Updated on August 20, 2011


© 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