Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Jon here's a simple (NT 6.5) strategy I was testing on the ES a few months back that uses swing Hi/Lo point patterns to enter trades. If you can improve the entry signals that would be great. At least, hopefully the Hi/Lo code will help you out.
Sorry, I didn't found any piece of NT code using multi dimensional arrays, but if you just need to store the previous swing high/swing low, using two simple variables is enough, something like (pseudo-code not tested):
I was wrong about the Swing ind. To update anyone who's following this post, I am making good progress on my divergence ind. I'm working on the the more complex part first... getting it to work with the MACD Histogram.
Broker: Tradestation/Tradestation, NinjaTrader, FXCM and Tallinex
Trading: ES, CL, EUR/USD, TF
Posts: 173 since Aug 2009
Thanks Given: 105
Thanks Received: 61
Hi Sam
this simple code worked well for me, but I noticed once the next bar would be > the swing high, it would still go long and opposite for short. so, I think
this is assuming you only want to go long the 1st time it breaks out or breaks down, rather than going long and short over and over just because it is above or below the swing level
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.
Attached is an indicator that I have coded based on NT's Swing indicator. It shows the trend based on a specified swing strength/period. The indicator can be referenced from a strategy. The code for a simple crossover strategy could be as follows:
if (Close[0] < SwingChartTrend(SwingPeriod).SupplyLine[0]
&& Close[1] > SwingChartTrend(SwingPeriod).DemandLine[1])
{
DrawArrowDown("My down arrow" + CurrentBar, false, 0, High[0]+(8*TickSize), Color.Red);
}
if (Close[0] > SwingChartTrend(SwingPeriod).DemandLine[0]
&& Close[1] < SwingChartTrend(SwingPeriod).SupplyLine[1])
{
DrawArrowUp("My up arrow" + CurrentBar, false, 0, Low[0]+(-8*TickSize), Color.Green);
}
Elite Membership required to download: SwingChartTrend.zip