Feedback loop of prevailing market conditions
Forums › ProRealTime English forum › ProOrder support › Feedback loop of prevailing market conditions
- This topic has 6 replies, 4 voices, and was last updated 3 years ago by
deletedaccount051022.
-
-
04/21/2022 at 10:12 AM #192009
Hi,
Within a strategy I wish to capture the prevailing market conditions at the time that a trade is open, such as volatility, volume and so on, with a view to feeding this back into the algo to identify the current prevailing market cylcle or change thereof. From this an algo could recognise what cycle the market is entering into (eg strong bull, range bound) and use a different set of stored parameters for the next trade.
For example, an algo goes long and after the position is opened the volatility begins to increase and the volume reduces. The next trade the aglo should take would use a more cautious set of parameters (a tighter stop loss, a smaller target profit, a shorter linear regression lookback period etc.)
Is this type of monitoring and feedback possible? The code I am currently using monitors Standard Deviation up to the point a position is opened. If volatility spikes during an open position then the same STD calculation used for the next trade should be on a shorter lookback period.
Thanks very much
04/21/2022 at 3:46 PM #19202404/21/2022 at 5:14 PM #192028Hi phoentzs
Thanks for your suggestion. To do as you suggest I believe that I would need to run 3x the risk. Might work but am ideally looking for a loopback.
Alternatively I could manually run a re-optimise on a regular basis, but you need to stop and re-start.
Thanks
04/21/2022 at 5:20 PM #192029need to stop and re-start.
I do this and record – in the ‘Notes for the System’ – a brief summary of performance up to when I stopped to reoptimise (over a weekend usually).
1 user thanked author for this post.
04/21/2022 at 6:19 PM #192034@samsampop
why triple risk? Spread the position size across all systems. So it’s basically the same risk as having the full position size in just one system. That’s why I like to use SP500, small margin, small spread.
1 user thanked author for this post.
04/22/2022 at 1:02 PM #192065STD Loop12345678910111213141516DefParam CumulateOrders = FalseNormSTDPerc = Std[20](Close) / Close * 100If NormSTDPerc > 0.2 and NormSTDPerc < 0.4 thenLookBackPeriod = 20ElsIf NormSTDPerc > 0.4 and NormSTDPerc < 0.8 thenLookBackPeriod = 10EndIfIf Close > Average[LookBackPeriod](Close) thenBuy 1 contract at MarketEndIfIf Close < Average[LookBackPeriod](Close) thenSellShort 1 contract at MarketEndIfHi @samsampop
You can normalize the standard deviation (NormSTDPerc = Std[20](Close) / Close * 100) and when the normalized standard deviation falls between certain boundaries, link these boundaries to, for example, the LookBackPeriod…
04/22/2022 at 6:27 PM #192086Hi JS
Thank you, it gives me an idea of solving this a different way. Much appreciated.
-
AuthorPosts
Find exclusive trading pro-tools on