TradingView
faytterro
17 אפר׳ 2024 10:42

Trend Catcher Strategy 

Bitcoin / TetherUSBinance

תיאור

what is Trend Catcher Strategy?
it is a strategy that opens long or short positions in the direction of the trend.

what it does?
TCS detects trend formations using its own unique method. Then, it opens a position in the direction of the trend and closes a part of the opened transaction (half according to default values) when the price reaches a certain level, and moves the remaining position to the point where it thinks the trend is over. You can easily understand how it works by looking at the images:




how it does it?
It obtains a value called a "limit" by dividing the difference between the highest value and the lowest value in a certain range (that is, the vector sum) to the sum of the lengths of the candles in a certain range (the total distance traveled). then multiplies this by 100 to get a percentage value. The closer this value is to 100, the stronger the trend.



הערות שחרור

trading window added. thanks to BigJasTrades for it.
תגובות
BigJasTrades
Hi mate, nice little strategy. Can I suggest the following amendment: add a trading window to it so people can auto-trade this and start tr
BigJasTrades
Example:
//trading window
startDate = input.time(defval = timestamp("1 Jan 2023 00:00:00"), title = "Start Date", tooltip = "Use this to set the date and time when strategy will start placing trades. Set this to a time just after the last candle when activating auto trading.", group = "TRADING WINDOW")
endDate = input.time(defval = timestamp("1 Jan 2030 00:00:00"), title = "End Date", tooltip = "Use this to set the date and time when strategy will stop placing trades.", group = "TRADING WINDOW")

and...

inTradeWindow = (time >= startDate) and (time < endDate) //calculate the trading/backtesting window
BigJasTrades
and change these lines:

l = ta.crossover(frs,limit) and ma>ma[1] and inTradeWindow
s = ta.crossover(frs,limit) and ma<ma[1] and inTradeWindow
faytterro
@BigJasTrades, I have updated it now. thanks for your advice <3
jack_000001
very good thank you
burgercrisis
Great script!
faytterro
@burgercrisis, thanks.
jiujianjiujian
Awesome Claes
עוד