Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
hi, i discover a trategy to trade in volatile enviorments, im not very well at coding but maybe somone could take advantage of it.

basicaly the strategy is this

you need 2 moving averges of 6 periods each one made whit high prices the other whit lows that create a canal. then you displace the 2 moving average 4 periods to the right, thats the setup.

long signal: if we have a closing price above the canal followed by a higher closing price, that is the long signal, closing the trade when the price gets into the canal again

short signal: if we have a closing price bellow the canal followed by a lower price, that is the short signal, closing again when the price gets into the canal again

i tried to code it by i failed, im learning but i dont have the knowledge for this one, if somone know how it can be done i would be thankfull