TradingView
rajista
Sep 7, 2018 7:23 PM

MA_strategy  

Bitcoin / DollarBitfinex

Description

MA strategy with selection of various MAs: SMA, EMA, TEMA, WMA, and HMA with custom length and time period.

Release Notes

fix
Comments
enidbin
Only do more, not short?
rajista
@enidbin, hii, if you want to implement short, then change line 61 of code to strategy.entry("short",strategy.short,ordersize,when=sell)

, everything else remains same. Hope that helps.
enidbin
Thank you!
Kotha_Rao
@rajista, Instead, I added the short line below 61-62. So, I get combined values of both Long and short together
capriole_charles
Unfortunately this is a classic example of over-fitting.
The strategy works excellently (when backtested with 0.08% fees) until the point of publishing (late 2018).
But, performance in 2019 is terrible. 50% of equity is lost in 2019, while at the same time Bitcoin tripled in price.
No strategy will work "all the time", so this may be a temporary blip, but it is a big red flag.
jessi061
@capriole_charles, It's our job being a strategist to remove the error and fix it. @rajista bruh you did well job man simple but efficient. It works still for those who understand strategies and pine script both.
akif_cetin
Nice :)
HandM8491
Ofcouse it does not WORK!!! otherwise he would LOCK it like other his scripts! I don't understand these people! you earn hell money mabe with ur accurate scripts ba still u r trying to dig money from people also! for god sake there are millions... There are few people I pray for the every day and thank them a lot, had almost 163 scripts all public free! thanks to those people we really appreciate! and I honestly wanted to send money to their account! unbelievably the guy didn't want it :))
Kotha_Rao
Also, is it possible to take last candle value and close last trade ? This will give better strategy results. Generally, last trade is always kept open as strategy condition is not met. This can be overcome by taking last candle value and close the trade. Appreciate your views. This is particularly useful in bigger time values like SMA100, SMA200 etc
Kotha_Rao
How to have multiple Time frame Moving Averages in one chart ? i.e. say 10 period SMA of (5,15,30)Minutes, Hourly, Daily in same chart ?
More