Filter for too high volatility

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #180718 quote
    phoentzs
    Participant
    Master

    I’m not sure yet whether it makes sense …

    is there a filter / indicator that keeps my bot out of the market if it is too volatile? For example, when news triggers high price fluctuations in both directions. Can you filter that in order to stay away from the market, i.e. not trigger a trade?

    #180720 quote
    robertogozzi
    Moderator
    Master

    You could make that filter yourself. Say some news make a spike, you can decide not to open a trade, no matter if your conditions are met, if the candle ‘s range is N times its average range over the last P periods.

    Or if the high is greater than the previous bar by X%.

    #180721 quote
    phoentzs
    Participant
    Master

    Could you please provide me with the code?

    #180732 quote
    robertogozzi
    Moderator
    Master

    There you go:

    AvgRange = average[20,0](range)
    TradeOFF  = range > (AvgRange * 2) //no trading if the current range > twice its average
    
    // or
    
    TradeOFF = ((1 - (high - high[1])) * 100) > 60 //no trading if high exceeded the previous high by 60%

    then use TradeOFF to not enter a trade.

    phoentzs thanked this post
    #180817 quote
    JS
    Participant
    Senior

    Hi @phoentzs

    You can also use the above with the volatility:

    xVolatility = Std[n](Close)

    or percentage

    xPVolatility = (Std[n](Close) / Close) * 100

    when the volatility is higher than x%, ensure that no trades are executed or close current trades.

    #180818 quote
    phoentzs
    Participant
    Master

    Thank you. 👍🏼

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Filter for too high volatility


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
phoentzs @phoentzs Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by phoentzs
4 years, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/01/2021
Status: Active
Attachments: No files
Logo Logo
Loading...