RafaelZioni

OBV MACD Indicator

5291 vizualizações
754
5291 27
So this script is my improvement to macd that we all know . it faster and more accurate with less lag
first is based on OBV as it primary source
next we convert the OBV to MA style format , in this case we can add all form of MA in order to calculate it . as you will see in settimgs it has many type of MA as each beahave differently
I make the signal to be in linear form jst to make it more sharp/ and in the end in order to make the signal i use Alex grover method (this guy is a genius:) )
in final step we can make pivots point on our new for macd
end resolt is a faster more accurate MACD and much more options fro modification then the regular macd
this is volume indicator based so in some graph where volume does not exist this will not work
Remover dos scripts favoritos Adicionar aos scripts favoritos
I am trying to test it as a strategy, so with the following modifications:
- instead of the study line: strategy(shorttitle="Strat test", title=" Strategy test", overlay=false)
- at the end of the script:
if (up)
strategy.entry("Long 1", strategy.long)
if (down)
strategy.close("Long 1")
The issues is that the entry / close points of the strategy are not in line with the signals of the inital charts (the blue / red crosses), there is always a lag of two periods with the strategy... Would you know why ?
Resposta
RafaelZioni remy0536
@remy0536, the step system has 1 candle lag.. in bactest you have 1 candle lag , so you get 2 candle lag in backtest.
one may change the signal from step to cross type (longer vs shorter length line) like in real macd then we can remove this lag..
Resposta
HAlthoff9 remy0536
@remy0536, When i try to convert it into a strategy like you said, i get this: "Add to Chart operation failed, reason: line 266: mismatched input 'strategy.entry' expecting 'end of line without line continuation'".
Can you tell me whats the problem? Or even better copy your strategy code and publish? Thank you!!
Resposta
remy0536 HAlthoff9
@HAlthoff9, the indentation is creating a problem sorry, this would work:

if (up)
strategy.entry("Long 1", strategy.long)

if (down)
strategy.close("Long 1")
Resposta
remy0536 remy0536
looks like tab doesn't get applied... (before strategy.entry and strategy.close in principle)
Resposta
rewrote in the strategy at 12 o’clock, managed to unscrew + 80.2% for 2019 with a drawdown of 27.47% sadness ...
+1 Resposta
RafaelZioni kirillkiselev82
@kirillkiselev82, it can be made better if we add filters to remove bad trades
Resposta
Alerts available on this???
Resposta
RafaelZioni alerttss2019
@alerttss2019,
paste this to script end
//Alerts
/////// Alerts /////
alertcondition(down,title="down")
alertcondition(up,title="up")
alertcondition(piv ? na : shrt ? na : pivoth ? max_upper + 2 : na,title="resistance pivot")
alertcondition(piv ? na : shrt ? na : pivotl ? min_lower - 2 : na,title="support pivots")
Resposta
Início Rastreador de Fundamentos Rastreador Forex Rastreador de criptomoedas Calendário econômico Shows Como Funciona Recursos gráficos Preços Regras da Casa Pine Wizards Moderadores Soluções para sites e corretoras Widgets Soluções em Gráficos Biblioteca de Gráficos Lightweight Central de Ajuda Indique um amigo Solicitação de recurso Blog & Notícias Twitter
Perfil Configurações de perfil Conta e cobrança Indique um amigo Meus Tíquetes de Suporte Central de Ajuda Ideias Publicadas Seguidores Seguindo Mensagens Privadas Conversa Deslogar