minorplanet2

Retracement Level Trigger

I use the simple script to notify me when a retracement level has been met. I use the SMS alert to tell me when a specific retracement level has been met from a local pivot a high or local pivot low. Please let me know what you think. Feel free to make improvements and repost.
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
study("Retracement")
// script written by Paul Johnson: minorplanet2
//  use this script to set triggers on Fibonacci retracement levels.
len=input(15,title="Lookback Length") //how far back to look for max pivots and min pivots
retr=input(0.382,title="Retracement Ratio",type=float)
base=input(50,title="Pivot Value", type=float) //  set the value of the fixed pivot from which to draw the retracement
mi=lowest(close,len)
m=highest(close,len)
tri=close<=((1-retr)*(m-base))+base?-1:close>=base-((1-retr)*(base-mi))?1:0
// calculates the retracement value for the range between the pivot input and the local min or max
// if the retracement from the local pivot high is met, a value of -1 is returned
// if the retracement from the local pivot low is met, a value of +1 is returned
plot(tri,title="retracement met:-1/1")