kvande97

IP Signals

21
Plots PowerTrend and Bounce signals.
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟
study(title="IP Signals", shorttitle="SIG", overlay=true)

//EMA SETTINGS
ema50 = ema(close, 50)
ema20 = ema(close, 20)
ema7 = ema(close, 7)
ema3 = ema(close, 3)
atrs = (offset(atr(3), 1) / atr(3))

//PLOT EMA LINES
plot(ema50, color=red)
plot(ema20, color=blue)
plot(ema7, color=white)
plot(ema3, color=yellow)

//CRITERIA FOR POWERTREND SETUPS
ptbuy = (ema3 > ema7 and ema7 > ema50) and (open > close) and (atrs >= 1)
ptsell = (ema3 < ema7 and ema7 < ema50) and (open < close) and (atrs >= 1)

//CRITERIA FOR 20 EMA BOUNCE SETUPS
b20buy = (ema20 > ema50) and (open > ema20) and (close > ema20) and (low < ema20) and (atrs >= 1)
b20sell = (ema20 < ema50) and (open < ema20) and (close < ema20) and (high > ema20) and (atrs >= 1)

//CRITERIA FOR 50 EMA BOUNCE SETUPS
b50buy = (ema20 > ema50) and (open > ema50) and (close > ema50) and (low < ema50) and (atrs >= 1)
b50sell = (ema20 < ema50) and (open < ema50) and (close < ema50) and (high > ema50) and (atrs >= 1)

//PLOT CRITERIA FOR POWERTREND SETUPS
PTB = iff(ptbuy == 1 and b20buy == 0 and b50buy == 0, 1, 0)
plotshape(PTB, style=shape.arrowup, color=green, location=location.belowbar, text="PT", textcolor=white)
PTS = iff(ptsell == 1 and b20sell == 0 and b50sell == 0, 1, 0)
plotshape(PTS, style=shape.arrowdown, color=red, location=location.abovebar, text="PT", textcolor=white)

//PLOT CRITERIA FOR 20 EMA BOUCE SETUPS
B2B = iff(ptbuy == 0 and b20buy == 1 and b50buy == 0, 1, 0)
plotshape(B2B, style=shape.arrowup, color=green, location=location.belowbar, text="B2", textcolor=white)
B2S = iff(ptsell == 0 and b20sell == 1 and b50sell == 0, 1, 0)
plotshape(B2S, style=shape.arrowdown, color=red, location=location.abovebar, text="B2", textcolor=white)

//PLOT CRITERIA FOR 50 EMA BOUNCE SETUPS
B5B = iff(ptbuy == 0 and b20buy == 0 and b50buy == 1, 1, 0)
plotshape(B5B, style=shape.arrowup, color=green, location=location.belowbar, text="B5", textcolor=white)
B5S = iff(ptsell == 0 and b20sell == 0 and b50sell == 1, 1, 0)
plotshape(B5S, style=shape.arrowdown, color=red, location=location.abovebar, text="B5", textcolor=white)

//PLOT CRITERIA FOR POWERTREND AND 20 EMA BOUNCE SETUPS
PTB2B = iff(ptbuy == 1 and b20buy == 1 and b50buy == 0, 1, 0)
plotshape(PTB2B, style=shape.arrowup, color=green, location=location.belowbar, text="PTB2", textcolor=white)
PTB2S = iff(ptsell == 1 and b20sell == 1 and b50sell == 0, 1, 0)
plotshape(PTB2S, style=shape.arrowdown, color=red, location=location.abovebar, text="PTB2", textcolor=white)

//PLOT CRITERIA FOR POWERTREND AND 50 EMA BOUNCE SETUPS
PTB5B = iff(ptbuy == 1 and b20buy == 0 and b50buy == 1, 1, 0)
plotshape(PTB5B, style=shape.arrowup, color=green, location=location.belowbar, text="PTB5", textcolor=white)
PTB5S = iff(ptsell == 1 and b20sell == 0 and b50sell == 1, 1, 0)
plotshape(PTB5S, style=shape.arrowdown, color=red, location=location.abovebar, text="PTB5", textcolor=white)

//PLOT CRITERIA FOR 20 EMA BOUNCE AND 50 EMA BOUNCE SETUPS
B2B5B = iff(ptbuy == 0 and b20buy == 1 and b50buy == 1, 1, 0)
plotshape(B2B5B, style=shape.arrowup, color=green, location=location.belowbar, text="B2B5", textcolor=white)
B2B5S = iff(ptsell == 0 and b20sell == 1 and b50sell == 1, 1, 0)
plotshape(B2B5S, style=shape.arrowdown, color=red, location=location.abovebar, text="B2B5", textcolor=white)

//PLOT CRITERIA FOR POWERTREND AND 20 EMA BOUNCE AND 50 EMA BOUNCE SETUPS
PTB2B5B = iff(ptbuy == 1 and b20buy == 1 and b50buy == 1, 1, 0)
plotshape(PTB2B5B, style=shape.arrowup, color=green, location=location.belowbar, text="PTB2B5", textcolor=white)
PTB2B5S = iff(ptsell == 1 and b20sell == 1 and b50sell == 1, 1, 0)
plotshape(PTB2B5S, style=shape.arrowdown, color=red, location=location.abovebar, text="PTB2B5", textcolor=white)