RE: Beginners Questions
(2018-07-24, 10:43 PM)malaguti Wrote: Hi Pcabc, no trend lines. I could have used "slope" i could have used MA > MA[1] i just happened to choose the linear regression as that also signifies turning points. no other reason
Sorry, I typed trend-lines but I meant regression. Still, if it works it could be interesting, it should detect when a moving average is turning up rather than flattening. This may be of use at the ends of stages?
Quote:if you use close is greater than 30, then you are too quickly going from one stage to anotherYou've prompted me to have a think about this myself. I think I will have a go at a few methods and have a plasy with channels for that purpose. I effectively use channels to detect new highs in my screener.
take the S&P again with a recent rising 30SMA. if you are in a stage 3 when it closes below, you would be in a stage 2 a couple of weeks later, where ive added the text in my chart.Â
the book and method looks to break a "high" an area of some previous resistance. i haven't yet come across in any charting package this concept of a high (almost like a zig zag), so ive used the donchian 20. you can see that the recent donchian break of the 20 again does seem to be doing a good job.
thats all it does, a good job, by no means perfect.Â
Quote:thanks for the comments though. my code could indeed be simpler using "slope". I just did it last night having been using amibroker previously which is better at backtesting and yes, you could use my method slavishly although i only did it to backtest the methodÂ
if you can think of other entries happy to look at all of them
thanks again pcabc. I may open another thread simply for this topic