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.
回覆