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
|