After having “borrowed” a lot of strategies from this forum, I though it only appropriate that I try to participate/contribute with something of my own. This is my first strategy that I am sharing, so pleas go easy on me.
My understanding of the idea is that you take a position when the market is in a “compressed” mode.
Unfortunately there is no way to exit on the close in PRT, if my understanding is correct. So pleas take a look at the code and give me some feedback on how to get better exits, or even how to improve on the code in general.
Thanks Yngve, I moved you post to the forums. I did not look at your code but you are right about the description you made of the strategy. So all the variables are optimized over the whole data? and there are a lot of them.. from candlesticks sizes to moving average period to filter the trend. Unger propose the strategy as a part of a portfolio, so I assume this is how it should be traded?
About exit on Close, it should be possible by using an intraday timeframe and make your calculations with the Daily OHLC.
Exit on Close should be possible by using the 5 minutes timeframe for instance: Close all orders @ 235500 (or whatever time adjusted to the instrument).
To calculate the Daily timeframe candlestick size (which is the major part of the trading strategy), you could use the Dopen / Dhigh / Dlow and Dclose keywords (instead of Open High, Low and Close).
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok