TradingView
Daveatt
2019年12月9日下午2點08分

BEST Trailing Take Profit Strategy 

Bitcoin / TetherUSBinance

描述

Hello traders

Hope you enjoyed your weekend on my behalf. Was staying home working ... ^^
This is my first strategy educational post I'm doing ever
While I'm generally against posting strategies because it's very easy to fake performance numbers... I cannot prevent myself from sharing a few cool strategy snippets anyway.

So from now on, I'll be sharing a few strategies also - generally not to showcase performance but only to show what pinescript can do.
As once again strategy performance can be faked is so many ways... :)

What's on the menu?

We all know what a trailing-stop is. right? right? Ok... sharing the definition here :)

A trailing stop is designed to protect gains by enabling a trade to remain open and continue to profit as long as the price is moving in the investor's favor. The order closes the trade if the price changes direction by a specified percentage or dollar amount.

But...do you know what a trailing profit is?

Short definition: Well the same but with your profit limit order.
Long definition: A trailing profit is designed to increase your gains by enabling a trade to remain open and continue to profit as long as the price is moving in the investor's favor. The order closes the trade if the price hits the trailing profit level specified percentage or dollar amount.

Some trading strategies used both a trailing stop AND trailing profit. Not making any recommendation here - only sharing what's possible in the realm of trading and pinescripting

Trigger me I'm famous

I developed many trading strategies in my career and often I've been asked to trigger a trailing-stop or trailing-profit once a certain % move has been made.
I integrated here a Take Profit trigger - once hit, it will activate the trailing profit

On the screenshot below, the TP trigger is plotted in orange. Once the price goes past that level for the first time, I'll start trailing the profit level.
In other words, when we see a price makes an interesting move in percentage value - we decide to offset the profit as we concluded that once it reached such distance - then it leads often to more profit

Of course, using only a trailing profit without stop/trailing-stop/invalidation isn't smart and the surest way to kiss goodbye a trading capital and trading and your good mood



See you tomorrow for another strategy snippet

All the BEST
Dave

發布通知

- Removed some debug plots

發布通知

- Changed the strategy position names
評論
xxy_theone
Upvoted!

The P&L chat doesn't look very appealing today in May 2020. Various strategies seem to work in certain market conditions, and then it stop working. The script seem to have worked like a charm in the first 25 trades or so, and from 510 to 525 (roughly). The rest is pretty much downhill. What's annoying is the X axis of the P&L chart only says which number of trade, with no indication of date, otherwise one could at least backcheck the market conditions. The List of Trade is broken too for some reason, nothing shows when you click on it. None of this is your problem though, these are pine script issues.
Rolypop
Can you make a study version,please? for alertcondition.
because I am a beginner.....
Daveatt
@finetime1000, Will DM you
VatsalBindal
Strategy does not woek well with trailing % = 0 . With the trigger at 5% , it does not close the trades at exactly at 5%. There are huge deviations. Sometimes upto 9% too. What can be a possible reason for this happening?
Daveatt
@VatsalBindal, I believe trailing %=0 and trigger = 5% isn't supposed to work
This means to start the trailing stop at 5% and then .... nothing as the trailing = 0%
I probably didn't manage this use case in the script

I'm pretty sure though that the use case trailing %=0 isn't handled by this script
VatsalBindal
@Daveatt, Thanks for the reply!
But I have a question about how do the input check boxes work,
When I check the "Use Take profit" and un-check the "Use Take profit Trigger,", it should work as the conventional take profit and exit at the %x profit given as an input to "Use Take profit". But it does not seem to work this way
sam3218
Hi, I don't understand what exactly Trail offset does?
Daveatt
@sam3218, it's a trigger basically
If I set an offset at 3% and a TP at 2% for a LONG, the strategy waits for a 3% move upwards, from here it will set a TP target 2% higher
CryptoManiac01
hello what are the red and green dot indicate? and what does is it mean by BEST?
Daveatt
@CryptoManiac01, The green and red dots are the two moving averages cross mentioned above
BEST is my brand as I'm the owner of Best Trading Indicator
I probably overuse it ^^
更多