phi35

Swing Chart V1 by Phi35 ©

With this indicator, which plots the swing chart of the 3 degrees, swing traders can automate their work of tracking the right bars.

How it works:
  • Minor Degree (one bar) (gray)= If the current high is higher than the previous high or the current low is lower than the previous low.
  • Intermediate Degree (two bar) (baby blue)= If the current high is higher than previous and the penultimate high etc.
  • Main Degree (three bar) (red)= If the current high is higher than the previous, the penultimate and the high before penultimate high etc.

Alert:
On crossover there will be an alert (popup with a message) and in addition you will see "diamonds" on the place where the crossover took place


If there is an issue or any suggestions, feel free to contact me. Do not modify the code without permission.
Swing Chart V1 by Phi35 ©


開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?
//@version=2
study("Swing Chart V1 by Phi35", overlay=true)
//Swing Chart V1 by Phi35 - 3rd September 2016 (c)
//Do not modify the code without permission!
//If there is an issue or any suggestions, feel free to contact me on the link below
//https://new.tradingview.com/u/phi35/

//It seems to work well but still no guarantee on completeness!
//RISK WARNING! PAST PERFORMANCE IS NOT NECESSARILY INDICATIVE OF FUTURE RESULTS. IN MAKING AN INVESTMENT DECISION, TRADERS MUST RELY ON THEIR OWN EXAMINATION OF THE ENTITY MAKING THE TRADING DECISIONS!

//How it works:
//Minor Degree (one bar) (gray)= If the current high is higher than the previous high or the current low is lower than the previous low.
//Intermediate Degree (two bar) (baby blue)= If the current high is higher than previous and the penultimate high etc.
//Main Degree (three bar) (red)= If the current high is higher than the previous, the penultimate and the high before penultimate high.
//On crossover there will be an alert (popup with a message) and in addition you will see "diamonds" on the place where the crossover took place
//In the preferences menu you can turn the specific degrees on and off

//Body
barcolor(#313B3F)
bgcolor(#272F32, transp=0)

//Minor Degree
minorbull = if(high[0]>high[1])// and high[1] > high[2])
    high
minorbear = if(low[0]<low[1])// and low[1] < low[2])
    low

plot(high[0]>high[1]? minorbull : minorbear, color=#6F7A7E, linewidth=2, transp=0, title="Minor Swing")


//Intermediate Degree
intbull = if(high[0]>high[1] and high[1] > high[2])
    high
intbear = if(low[0]<low[1] and low[1] < low[2])
    low

plot(high[0]>high[1]? intbull : intbear, color=#9DBDC6, linewidth=2, transp=0, title="Intermediate Swing")


//Main Degree
mainbull = if(high[0]>high[1] and high[1] > high[2] and high[2] > high[3])
    high
mainbear = if(low[0]<low[1] and low[1] < low[2] and low[2] < low[3])
    low

plot(high[0]>high[1]? mainbull : mainbear, color=#FF3D2E, linewidth=2, transp=0, title="Main Swing")


//CrossAlert
bullcross = (high[0]>high[1] and high[1] > high[2]) and (high[0]>high[1] and high[1] > high[2] and high[2]>high[3])
bearcross = (low[0]<low[1] and low[1] < low[2]) and (low[0]<low[1] and low[1] < low[2] and low[2]<low[3])
plotshape(bullcross, style=shape.diamond,title="Bull Cross", color=#6F7A7E, location=location.abovebar)
plotshape(bearcross, style=shape.diamond,title="Bear Cross", color=#6F7A7E, location=location.belowbar)


alertcondition(bullcross, title='Cross', message='2nd and 3rd have crossed!')
alertcondition(bearcross, title='Cross', message='2nd and 3rd have crossed!')