EduardoMattje Updated   
A very simple, almost naive strategy, in which you buy on the lowest of the two previous candles and sell at the highest of the two previous candles. You can configure these highest and lowest lenght, in some assets two is too small of a number to make profit. You can also configure to exit the position after X, and I found that 7 (which is a week of working days) is a good number for that.

This is strategy is intended to be used as a swing trade. Your capital needs to be high enough so that it can pay the operaitonal costs, and reach it's target with a reasonable profit.

Since this is a volatility based strategy, assets that are more liquid won't work properly.
Release Notes:
Added an option to set the initial backtesting date. Also added an option to increase or decrease the entry and exit points based on the ATR.
Release Notes:
Made use of the new time input function, and now you can configure the ATR period
Release Notes:
I made use of the new inline and group features on the input functions, so now they should be clearer and better organized.
Release Notes:
I made some changes to the code so that it loads faster.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.


The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?