NexusFi: Find Your Edge


Home Menu

 





How to calculate the 3 day slope of PPO-Histogram ?


Discussion in TradeStation

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




 
Search this Thread

How to calculate the 3 day slope of PPO-Histogram ?

  #1 (permalink)
hgchcw
Hong Kong + Hong Kong
 
Posts: 18 since Feb 2019
Thanks Given: 9
Thanks Received: 0

I am trying to calculate the 3 day slope of PPO-Histogram according to the SCTR short term indicators. Does tradestation's easy language has command to compute the slope? Now I can compute the PPO-Histogram of 3 days by the following codes. But don't know how to calculate the slope. I think the slope should be based on linear regression.

PPOValue0 = PPO(Close, 12, 26);
PPOAvg0 = XAverage( PPOValue0, 9 );
PPODay0 = PPOValue0 - PPOAvg0;

PPOValue1 = PPO(Close[1], 12, 26);
PPOAvg1 = XAverage( PPOValue1, 9 );
PPODay1 = PPOValue1 - PPOAvg1;

PPOValue2 = PPO(Close[2], 12, 26);
PPOAvg2 = XAverage( PPOValue2, 9 );
PPODay2 = PPOValue2 - PPOAvg2;

Thanks,
Raymond

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
What broker to use for trading palladium futures
Commodities
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
Strategy stop orders partially filled
EasyLanguage Programming
 
  #2 (permalink)
maggtrading
quintana roo, méxico
 
Posts: 84 since Mar 2013
Thanks Given: 222
Thanks Received: 40

a long time ago i was also interested in calculating the slope of some indicators but was never able to get ts to do that. in the end i decided to use percentage change, which is quite similar.


ts does include some trigonometric functions like sine, cosine and others and i think it can also calculate linear regressions, so maybe you can create some workarounds to approximate the values for slope with other functions.

Reply With Quote
  #3 (permalink)
 kjhosken 
Seattle, WA/USA
 
Experience: Intermediate
Platform: TOS, TS
Trading: Forex, crude
Posts: 96 since Sep 2016
Thanks Given: 7
Thanks Received: 35


Hopefully I understand your needs correctly, but here goes. The equation for slope is rise/run and we know run = 3 since that is what you are interested in. Rise is the same as delta value, so it should be (PPO[0]-PPO[3]) / 3.

Follow me on Twitter Reply With Quote




Last Updated on June 12, 2019


© 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