Big Mike's Trading Forum
 

Go Back   Big Mike's Trading Forum

> Trading Forums > Platforms and Indicators > NinjaTrader > NinjaTrader Programming


Notices
     

Swing Hi/Lo points for indicator values?
Started:April 18th, 2010 (04:56 AM) by zacharydw00 Views / Replies:4,743 / 18
Last Reply:August 20th, 2011 (04:36 AM) Attachments:3

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
 3  
 
Thread Tools Search this Thread

Swing Hi/Lo points for indicator values?

Old April 18th, 2010, 04:56 AM   #1 (permalink)
Elite Member
Idaho
 
Trading Experience: Intermediate
Platform: NinjaTrader,ToS
Broker/Data: Amp Futures, ToS
Favorite Instrument: ES, E7, CL, GC
 
zacharydw00's Avatar
 
Posts: 137 since Aug 2009
Thanks: 81 given, 147 received

Swing Hi/Lo points for indicator values?

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.

Reply With Quote
     

Old April 18th, 2010, 04:56 AM   #2 (permalink)
Quick Summary
Quick Summary Post

I have solved my question here and have moved on to coding my ind. I've started a new post to gather ideas on filtering bad divergence patterns...
https://www.bigmiketrading.com/ninjatrader-programming/3640-post-your-favorite-divergence-ind-here.html#post37639
Thanks, Zac


Last edited by zacharydw00; April 30th, 2010 at 05:17 PM.
     

Old April 18th, 2010, 05:58 AM   #3 (permalink)
Elite Member
Austin, TX
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Instrument: Currencies
 
hondo69's Avatar
 
Posts: 165 since Jun 2009
Thanks: 57 given, 223 received


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
     

Old April 19th, 2010, 02:38 AM   #4 (permalink)
Elite Member
Frankfurt
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Instrument: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 883 received

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
     

Old April 19th, 2010, 04:59 AM   #5 (permalink)
Elite Member
Frankfurt
 
Trading Experience: Intermediate
Platform: NinjaTrader
Favorite Instrument: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 883 received

Current BMT User Poll

For you, trading is a...

 
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
     

Old April 20th, 2010, 02:40 AM   #6 (permalink)
Elite Member
Brooklyn, New York
 
Trading Experience: Intermediate
Platform: Sierra Charts, NinjaTrader, mt4, oanda, some multicharts
Broker/Data: cms forex
Favorite Instrument: currency futures, forex
 
Reggy's Avatar
 
Posts: 18 since Apr 2010
Thanks: 21 given, 33 received

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!

Reply With Quote
     

Old April 21st, 2010, 04:09 PM   #7 (permalink)
Elite Member
Idaho
 
Trading Experience: Intermediate
Platform: NinjaTrader,ToS
Broker/Data: Amp Futures, ToS
Favorite Instrument: ES, E7, CL, GC
 
zacharydw00's Avatar
 
Posts: 137 since Aug 2009
Thanks: 81 given, 147 received

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.

Reply With Quote
     

Old April 24th, 2010, 01:17 PM   #8 (permalink)
Elite Member
allentown
 
Trading Experience: Advanced
Platform: Ninjatrader, Tradestation
Broker/Data: zen-fire
Favorite Instrument: 6e,cl
 
jcar's Avatar
 
Posts: 10 since Apr 2010
Thanks: 1 given, 12 received


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?

Reply With Quote
     

Old April 24th, 2010, 04:34 PM   #9 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Trading Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Instrument: Futures
 
sam028's Avatar
 
Posts: 2,688 since Jun 2009
Thanks: 2,752 given, 3,031 received

Answer
This post has been selected as an answer to the original posters question Answer


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, ...


Usually in trading, those who know don't talk, and those who talk don't know. (Al Brooks)
success requires no deodorant! (Sun Tzu)
Reply With Quote
     

Old April 25th, 2010, 12:35 AM   #10 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
 
Trading Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Instrument: $EURUSD when it is trending
 
Trader.Jon's Avatar
 
Posts: 500 since Jul 2009
Thanks: 401 given, 162 received


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
     

Reply



Tags
ai, array, arrays, channel, close, code, coding, color, crossovers, dataseries, divergence, dow, el, enter, entry, es, fix, function, functions, ga, high, histogram, how to, indicator, indicators, learn, line, love, low, macd, market, market order, ml, modify, momentum, ninja, ninjatrader, nt, order, override, pat, patterns, period, pivots, platforms, plot, price, price_action, profit, profitable, program, question, signals, simple, small, stochastics, stop, strategy, strength, support, swing, targets, testing, time, trader, trades, tradestation, trading, trend, type, update, values
     

Big Mike's Trading Forum > Trading Forums > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Swing Hi/Lo points for indicator values?

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads
Thread Thread Starter Forum Replies Last Post
Swing/Pivot Points trs3042 Traders Hideout 3 November 28th, 2010 09:58 PM
ZigZag indicator but with tick difference shown at the pivot points wuolong NinjaTrader 3 April 6th, 2010 08:59 AM
Printing values from Fractal Indicator eurostoxx NinjaTrader Programming 1 December 14th, 2009 07:22 AM
Referencing values in another indicator or Saroj NinjaTrader Programming 0 September 4th, 2009 11:02 PM
Translating EMA-values to ZN-values or visaversa max-td NinjaTrader Programming 17 June 22nd, 2009 03:42 PM


All times are GMT -4. The time now is 01:00 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.16 seconds with 38 queries on atlantis via your IP 50.17.162.174