مقایسه میله های فعلی و قبلی در نشانگر

ساخت وبلاگ

من سعی می کنم یک نشانگر منبع باز را اصلاح کنم تا هر زمان که نشانگر "بالا/آبی" یا "پایین/قرمز" را از حالت خنثی/خاکستری تنظیم کند ، پرچم را تنظیم کنم. در اینجا یک تصویر برای نشان دادن کدام میله ها/مواردی که می خواهم پرچم گذاری کنم وجود دارد: مثال تصویر من زمینه برنامه نویسی را در وب/js/gen دارم~، اما من در اسکریپت کاج و شاخص های معاملاتی بسیار جدید هستم. آیا می توانید به من اشاره کنید که چگونه آن را انجام دهم؟متشکرم! در اینجا کد شاخص وجود دارد:

//@version=5 //By Glaz, Modified // indicator('QQE MOD') RSI_Period = input(6, title='RSI Length') SF = input(5, title='RSI Smoothing') QQE = input(3, title='Fast QQE Factor') ThreshHold = input(3, title='Thresh-hold') // src = input(close, title='RSI Source') // // Wilders_Period = RSI_Period * 2 - 1 Rsi = ta.rsi(src, RSI_Period) RsiMa = ta.ema(Rsi, SF) AtrRsi = math.abs(RsiMa[1] - RsiMa) MaAtrRsi = ta.ema(AtrRsi, Wilders_Period) dar = ta.ema(MaAtrRsi, Wilders_Period) * QQE longband = 0.0 shortband = 0.0 trend = 0 DeltaFastAtrRsi = dar RSIndex = RsiMa newshortband = RSIndex + DeltaFastAtrRsi newlongband = RSIndex - DeltaFastAtrRsi longband := RSIndex[1]> longband[1] and RSIndex>باند بلند [1]؟Math. max (Longband [1] ، Newlongband): Newlongband Shortband: = RSindex [1]بالایی؟#00c3ff: rsima - 50= 50؟qqezlong + 1: 0 qqezshort: = rsindex<50 ? QQEzshort + 1 : 0 // Zero = hline(0, color=color.white, linestyle=hline.style_dotted, linewidth=1) //////////////////////////////////////////////////////////////// RSI_Period2 = input(6, title='RSI Length') SF2 = input(5, title='RSI Smoothing') QQE2 = input(1.61, title='Fast QQE2 Factor') ThreshHold2 = input(3, title='Thresh-hold') src2 = input(close, title='RSI Source') // // Wilders_Period2 = RSI_Period2 * 2 - 1 Rsi2 = ta.rsi(src2, RSI_Period2) RsiMa2 = ta.ema(Rsi2, SF2) AtrRsi2 = math.abs(RsiMa2[1] - RsiMa2) MaAtrRsi2 = ta.ema(AtrRsi2, Wilders_Period2) dar2 = ta.ema(MaAtrRsi2, Wilders_Period2) * QQE2 longband2 = 0.0 shortband2 = 0.0 trend2 = 0 DeltaFastAtrRsi2 = dar2 RSIndex2 = RsiMa2 newshortband2 = RSIndex2 + DeltaFastAtrRsi2 newlongband2 = RSIndex2 - DeltaFastAtrRsi2 longband2 := RSIndex2[1]>longband2[1] and RSIndex2>Longband2 [1]؟Math. max (Longband2 [1] ، Newlongband2): Newlongband2 Shortband2: = rsindex2 [1]= 50؟qqe2zlong + 1: 0 qqe2zshort: = rsindex2<50 ? QQE2zshort + 1 : 0 // hcolor2 = RsiMa2 - 50>threshhold2؟color. silver: rsima2 - 50<0 - ThreshHold2 ? color.silver : na plot(FastAtrRsi2TL - 50, title='QQE Line', color=color.new(color.white, 0), linewidth=2) plot(RsiMa2 - 50, color=hcolor2, title='Histo2', style=plot.style_columns, transp=50) Greenbar1 = RsiMa2 - 50>ThreshHold2 Greenbar2 = RsiMa - 50>Redbar1 Upper 1 = RSIMA2 - 50<0 - ThreshHold2 Redbar2 = RsiMa - 50  
  • کوارتو
  • بازرگانی الگوریتمی
  • تجارت
  • Pine-Script-V5 < Span> مقایسه میله های جریان و قبلی در نشانگر
فارکس به زبان ساده...
ما را در سایت فارکس به زبان ساده دنبال می کنید

برچسب : نویسنده : طاهره ایرانی بازدید : <-PostHit-> تاريخ : شنبه 21 مرداد 1402 ساعت: 11:52