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

Dilihat 28472
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

*** USE AT YOUR OWN RISK ***
Catatan Rilis: Converted to Pinescript v4
Skrip open-source

Sejalan dengan semangat TradingView, penulis skrip ini telah mempublikasikannya secara open-source, sehingga para trader dapat memahami dan memverifikasinya. Salut untuk sang penulis! Anda dapat menggunakannya secara gratis, tetapi penggunaan kembali kode ini dalam publikasi diatur oleh Tata Tertib. Anda dapat memfavoritkannya untuk dapat menggunakannya didalam sebuah chart.

Inggin menggunakan skrip ini pada chart?
JustUncleL

## Komentar

thanks a ton sir really appreciate love your work so trader focused ! :)
Jawab
This is a very nice indicator.
Is it repaint?
Jawab
Does this repaint?
Jawab
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.
Jawab
twingall
@twingall, Man Can you tell me how to fix that I am trying to automate this Strategy
Jawab
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
Jawab
@JustUncleL Is there a way to run this on futures? It seems that it only allows trades on equities. Thank you!
Jawab
Hi JustUncleL, this is amazing. Is there anyway I can try it on MT4? Thanks.
Jawab
-Juju-
@-Juju-, Sorry TV Pinescript is not compatible with the MT4 platform.
Jawab
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
Jawab