NexusFi: Find Your Edge


Home Menu

 





Need help/input on simple trend calc


Discussion in Platforms and Indicators

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




 
Search this Thread
  #1 (permalink)
 RM99 
Austin, TX
 
Experience: Advanced
Platform: TradeStation
Trading: Futures
Posts: 838 since Mar 2011
Thanks Given: 124
Thanks Received: 705

I'd like to develop a "simple" trendline calculation which yields a binary output (upward trend or downward trend).

Strength or slope would be nice, but isn't paramount. I'm more concerned about making sure that I get the localized trend correct.

The calculation would only need to be for the previous few bars (say 2-5).

I've thought about averaging the highs/lows along with the opens/closes and interpolating between bars....

i.e.

bar[1]: Open of 100.00, Close of 200.00, High of 250.00 and low of 50.00.

The "center mass" of that bar would be (((H+L)/2)+((O+C)/2))/2 or 150.00

Obviously if the "center" mass of the previous bar was lower, it would be an upward trend.

The other possibilities are even simpler, by getting a delta from the 2 bars, highs, lows, opens, closes for a 4 number vote (weighted).

any help, recommendations or input would be greatly appreciated. Especially if I don't have to reinvent the wheel.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Warsh Drops Easing Bias, December Hike Now Above 50% -- …
Prediction Markets & Event Contracts
Would a node-based workflow for automated trading be useful?
Traders Hideout
Daytrading to swingtrading
Traders Hideout
No book, only a stair: journaling fills where price move …
Cryptocurrency
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Afternoon-close session
1 thanks
Franks Trading Journey
1 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,117



RM99 View Post
I'd like to develop a "simple" trendline calculation which yields a binary output (upward trend or downward trend).

Strength or slope would be nice, but isn't paramount. I'm more concerned about making sure that I get the localized trend correct.

The calculation would only need to be for the previous few bars (say 2-5).

I've thought about averaging the highs/lows along with the opens/closes and interpolating between bars....

i.e.

bar[1]: Open of 100.00, Close of 200.00, High of 250.00 and low of 50.00.

The "center mass" of that bar would be (((H+L)/2)+((O+C)/2))/2 or 150.00

Obviously if the "center" mass of the previous bar was lower, it would be an upward trend.

The other possibilities are even simpler, by getting a delta from the 2 bars, highs, lows, opens, closes for a 4 number vote (weighted).

any help, recommendations or input would be greatly appreciated. Especially if I don't have to reinvent the wheel.


I do not think that a trend can be determined from the last 5 bars, but 30 or 50 bars would be more appropriate. But if you insist on taking 5 bars only you have numerous options.

-> Use a 5-period Fast Stochastic or 5 period RSI and check whether they are above or below 50, you can even define a neutral range.
-> Check whether the close is above or below the 5-period Median or 5-period SMA.
-> Determine the slope of a 5-period Linear Regression Indicator
-> Calculate the 5-period Directional Movement

and so on. There are no limitations how to define the trend. Again I use a much longer term period to define a trend and then try to identify retracements within that longer period, which are tradeable.


Reply With Quote




Last Updated on June 16, 2011


© 2026 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 - Downloads - Top
no new posts