OPEN-SOURCE SCRIPT

2HL

已更新
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.
發布通知
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.
發布通知
Made use of the new time input function, and now you can configure the ATR period
發布通知
I made use of the new inline and group features on the input functions, so now they should be clearer and better organized.
發布通知
I made some changes to the code so that it loads faster.
Average True Range (ATR)Donchian Channels (DC)highestHistorical Volatilitylowestobjectivestormerswingtrading

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明