NexusFi: Find Your Edge


Home Menu

 





Need help/input on simple trend calc


Discussion in Platforms and Indicators

Updated
    1. trending_up 2,366 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?
Peace Deal Forward Curve: May 22%, June 51%, December 81 …
Prediction Markets & Event Contracts
Prediction Markets Lock Fed Pause at 99pct for April 29 …
Prediction Markets & Event Contracts
Iran Airspace Contract Surges to 33.5% as Project Freedo …
Prediction Markets & Event Contracts
CFTC Workforce Shrinks 24% to 15-Year Low While Predicti …
Traders Hideout
Kraken Becomes First US Digital Asset Bank With Direct F …
Cryptocurrency
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
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,114



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