Quote:
|
Originally Posted by mrebersv
To take the slope for whatever the timeframe of the chart is, I thought I'd just change
Code:
double slopeLsma = (lsma25-oldLsma)/(Period()*Point);
to
Code:
double slopeLsma = (lsma25-oldLsma)/Point;
.
|
Doing that, you will have the slope expressed in pips by timeframe unit, and I think you are looking just for the opposit, ie to have a slope without relationship with the timeframe. That's why I sugest you to use a fixed time as unit, like 1 min or 1 hour but something which has nothing to do with the graphical representation of the slope itself, so when you zoom or change the timeframe, the grafical representation of the slope will follow your changes.
Maybe you should first write a test indic which drawn the slopes (trend lines) to visualise them and see if they are correct or not.
Now the angles. If you arctan the slope to get an angle, and if the slope is not correlate to the frame, your angle will be constant against zoom or timeframe change, ie meaningless. Anyway an angle is always meaningless outside of a particular frame.
Once more, you can add the slopes if they have the same units, and match the resulting slope with some color if you want; but I do not know the original indic, maybe you can upload it here so I can see how it works.