TradingView
echepata
24 Mei 2021 pukul 01.23

Crypto momentum strategy 

Bitcoin / TetherUSBinance

Deskripsi

This strategy is based on LazyBear's Squeeze Momentum indicator. It analyzes when the trend in the momentum is shifting, locating the peaks and the valleys, and takes those as sell and buy signals respectively. This is a long strategy, so it also takes into consideration the 50 period Exponential Moving Average to identify upward trends. If the closing price of the candle is above the 50EMA, and the slope of the 50EMA is trending upwards, then the buy signal is executed. If these conditions are not met, the buy signal is ignored.

This strategy works well with crypto trading on the day/week charts.

It has a profit ratio of 4:1 on average, and roughly half of the trades are profitable.

Catatan Rilis

Change the strategy parameters to be standard (100000 initial balance, with 100% of equity invested in each trade)

Catatan Rilis

Added setting to consider the behavior of the crypto market to enter trades. This improves the performance on lesser known coins that are very affected by the market, but has an adverse effect on big cap coins like Bitcoin and Ethereum (that have a great influence on the market). I recommend turning it off for these big coins, and leaving it on for all the others.

It works by polling the value of CRUPTOCAP:TOTAL, and checking if it's above its 50 ema, and if the ema is trending upwards. If these conditions are not met, the entry signal is ignored.

Catatan Rilis

Use the closing value of the market instead of the low

Catatan Rilis

Update documentation and credits

Catatan Rilis

Cleanup chart
Komentar
chrisvanoz
Hello @echepata, you indicator works pretty good. Thank you so far!

But could you please help me with the following:
"if co and source > ema and emaSlope > 0 and (not considerMarket or (market > marketEma and marketEmaSlope > 0))"
I understand, what it does, but not how. I got the first part until the brackets, but I have a problem in understanding the "not" "or" part.

I also checked the original strategy from LazyBear...maybe everybody understands the "val" function, but I am just wondering, what it does and why he needs it in his strategy, as it is not a buy trigger there. On the other hand you use it as a buy trigger. What is it actually good for and how does it work?

The "TrueRange" checkbox does not affect the results, so trades and profits keep the same. Do you have any explanation for this?

Last and least, you use for the "slope" "val[2]" instead of e.g. "val[1], so I assume the results are just better with "val[2]" or is there another reason?

Thank you!
echepata
Hi @meltinsands, I'm happy you have found value in this indicator.

Let me try to address your questions:
- "considerMarket" is a variable that contains the value of the checkbox. When you untick the checkbox for the market checks, then "not considerMarket" is true, so the 'if' is executed without checking the extra conditions. If you have checked the checkbox for market checks, then "not considerMarket" is false, and the remaining parenthesis is evaluated, which checks if the market value is above the average, and if it's trending upwards.
(more coming :) )
echepata
... continued
@meltinsands
- There is no "val" function. In the script, "val" is a variable that contains the calculated momentum, using a linear regression. I later use it to see the slope of the momentum, because the hypothesis is that whenever the slope of the momentum changes, that's when you would want to buy/sell.
- The "TrueRange" checkbox came from Lazybears script, which controls how the "squeeze" is calculated. The squeeze is not ultimately used in my indicator. That's why you don't see any changes.
- The first point should clarify the "slope" "val" question.

Let me know if you have any other questions!
chrisvanoz
@echepata, thank you for the detailed answer. It really helped me to understand the script a lot better. And of course, you are right, val is a variable.
"not considerMarket or (market > marketEma and marketEmaSlope > 0)" this is really tricky for a newbie, but I got it. Now it looks too easy for me..haha.

And again, as the last question above does not make sense: "slope = val - val(2)" makes it slower, but I suppose you reached the best results with (2) instead of (1)
Actually you could have killed the BB and KC, as you only need ema, sma and length. Why didn't you?
The common momentum indicator is just the difference between two prices and I have never seen a momentum oscillator like this and google says the same. LazyBear should have called it "the lazy momentum" ;-)
Superveloce37
hi, can someone please again how this indicators works ?

What triggers the "close entry long" ?
What triggers the "long" ?

How to read the green/red dots ? What is the relationship between the green/red dots and "close entry long"/"long" ?

Thank you very luch for your help
echepata
Hey @Superveloce37, here's how to read the indicator. The gray line is the momentum of the price action (which is based on Lazybear's Squeeze momentum indicator). The red and green dots show the slope of the momentum. The main premise of the strategy is that when the momentum changes direction, this is when we should buy/sell.

This long strategy will buy when it sees a green dot (meaning that the momentum is changing direction), only if the current price is above the 50 EMA. It also considers the behavior of the Crypto market, and that needs to be above the 50 EMA as well. (you can turn off the crypto market stuff from the strategy settings)

The strategy will close the trade when it sees a red dot.

Let me know if you have any other question, and I'll be happy to try to answer.

Cheers!
liuqiba
Good long strategy,but it's a bear market now
echepata
@liuqiba, could it be turning now 🤔 ?
liuqiba
@echepata, Not in my opinion now
ADHDCRYPT0
Hey @echepata - this is a really interesting script, thanks for sharing. Learning you can poll the value of another ticker has just levelled up my knowledge.

I have a (dumb) question related to strategy parameters... I've been writing a few of my own scripts which seem profitable in backtesting and I've set the initial balance / order size to match my account. Is the reason you set your parameters at 100,000 / 100 done as an example with the expectation people will amend to their own sizing? I ask because the results can swing wildly depending on the parameters used. Thanks!
Lebih lanjut