JustUncleL

[STRATEGY][UL]Price Divergence Strategy v1.0

Created by Request: This is a trend trading strategy that uses Price Divergence detection signals that are confirmed by the "Murrey's Math Oscillator" (Donchanin Channel based).

Strategy Code Based on:
  • Price Divergence Detector V2 by RicardoSantos
  • UCS_Murrey's Math Oscillator by Ucsgears
Strategy Risk Management Based on:
  • Strategy Code Example by JayRogers
Information on Divergence Trading:


*** USE AT YOUR OWN RISK ***
Скрипт с открытым кодом

В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения. Вы можете добавить этот скрипт в избранное и использовать его на графике.

Хотите использовать этот скрипт на графике?
JustUncleL

Комментарии

This is a very nice indicator.
Is it repaint?
+45 Ответить
Does this repaint?
+25 Ответить
Thanks for this. One issue, the compiler thinks the trailing offset set to zero means zero (not na).. thats why all your your buy exits shown above are happening at precisely the high of the candle.
+4 Ответить
@twingall, Man Can you tell me how to fix that I am trying to automate this Strategy
Ответить
hi thanks for this wonderful code
plz help me with this i am changing this entire code to version 4 i done but i couldn't know how to do the below code (part of the your entire code)

// ||••> START FISHER FUNCTION
f_fisher(_src, _window)=>
_h = highest(_src, _window)
_l = lowest(_src, _window)
_value0 = .66 * ((_src - _l) / max(_h - _l, .001) - .5) + .67 * nz(_value0)
_value1 = _value0 > .99 ? .999 : _value0 < -.99 ? -.999 : _value0
_fisher = .5 * log((1 + _value1) / max(1 - _value1, .001)) + .5 * nz(_fisher)
// ||<•• END FISHER FUNCTION

it says
Add to Chart operation failed, reason: line 69: Undeclared identifier '_value0';
line 71: Undeclared identifier '_fisher'

as of my knowledge "_value0" and "_fisher" has no input value before so it shows that error .. how can i break this
plz help me i am not a coder
+3 Ответить
@JustUncleL Is there a way to run this on futures? It seems that it only allows trades on equities. Thank you!
+3 Ответить
Hi JustUncleL, this is amazing. Is there anyway I can try it on MT4? Thanks.
+2 Ответить
@-Juju-, Sorry TV Pinescript is not compatible with the MT4 platform.
Ответить
Hi, would you be able to add alerts to your code? Would be great to be notified when there's a reversal or divergence. I'm pretty new to trading and don't know if this would need to be done on your end. When I go to alerts there isn't an option for your script. Unfortunately most of my trading is done on the road and I'm not able to look at charts all day.
Thanks, Steve
+1 Ответить
@duk20, Sorry, Alerts cannot currently be added to a BackTest Strategy script.
Ответить