Bank Zones #PipGang
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// ©PhilWill167

//@version=4
study("Bank Zones #PipGang", overlay=true)
 

///////////////////// - US30 -/////////////////////
ShowSymbol1 = input (false, title="Show US30 Bank Levels", inline="1")
Symbol1_Pair = "US30USD" 
Symbol1 = security(Symbol1_Pair,timeframe.period,close)
Symbol1_SelectedPrice = input(title="Price", defval=35600.0, type=input.float, inline="2") 
Symbol1_IncVal = input(title="Increment By +/-",  defval=50.0, type=input.float, inline="2", tooltip="50 = 50 Pips") 
 //Symbol 1 Draw lines
plot(Symbol1_Pair == syminfo.ticker and ShowSymbol1 ? Symbol1_SelectedPrice+(Symbol1_IncVal*0) :na , title='Symbol1 Line1',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol1_Pair == syminfo.ticker and ShowSymbol1 ? Symbol1_SelectedPrice+(Symbol1_IncVal*1) :na , title='Symbol1 Line2',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol1_Pair == syminfo.ticker and ShowSymbol1 ? Symbol1_SelectedPrice+(Symbol1_IncVal*2) :na , title='Symbol1 Line3',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol1_Pair == syminfo.ticker and ShowSymbol1 ? Symbol1_SelectedPrice+(Symbol1_IncVal*3) :na , title='Symbol1 Line4',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol1_Pair == syminfo.ticker and ShowSymbol1 ? Symbol1_SelectedPrice+(Symbol1_IncVal*4) :na , title='Symbol1 Line5',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol1_Pair == syminfo.ticker and ShowSymbol1 ? Symbol1_SelectedPrice-(Symbol1_IncVal*1) :na , title='Symbol1 Line-1',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol1_Pair == syminfo.ticker and ShowSymbol1 ? Symbol1_SelectedPrice-(Symbol1_IncVal*2) :na , title='Symbol1 Line-2',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol1_Pair == syminfo.ticker and ShowSymbol1 ? Symbol1_SelectedPrice-(Symbol1_IncVal*3) :na , title='Symbol1 Line-3',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol1_Pair == syminfo.ticker and ShowSymbol1 ? Symbol1_SelectedPrice-(Symbol1_IncVal*4) :na , title='Symbol1 Line-4',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol1_Pair == syminfo.ticker and ShowSymbol1 ? Symbol1_SelectedPrice-(Symbol1_IncVal*5) :na , title='Symbol1 Line-5',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)



///////////////////// - Gold -/////////////////////
ShowSymbol2 = input (false, title="Show Gold Bank Levels", inline="3")
Symbol2_Pair = "XAUUSD" 
Symbol2 = security(Symbol2_Pair,timeframe.period,close)
Symbol2_SelectedPrice = input(title="Price", defval=1870.000, type=input.float, inline="4") 
Symbol2_IncVal = input(title="Increment By +/-",  defval=5, type=input.float, inline="4", tooltip="5 = 50 Pips")
//Symbol 2 Draw lines
plot(Symbol2_Pair == syminfo.ticker and ShowSymbol2 ? Symbol2_SelectedPrice+(Symbol2_IncVal*0) :na , title='Symbol2 Line1',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol2_Pair == syminfo.ticker and ShowSymbol2 ? Symbol2_SelectedPrice+(Symbol2_IncVal*1) :na , title='Symbol2 Line2',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol2_Pair == syminfo.ticker and ShowSymbol2 ? Symbol2_SelectedPrice+(Symbol2_IncVal*2) :na , title='Symbol2 Line3',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol2_Pair == syminfo.ticker and ShowSymbol2 ? Symbol2_SelectedPrice+(Symbol2_IncVal*3) :na , title='Symbol2 Line4',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol2_Pair == syminfo.ticker and ShowSymbol2 ? Symbol2_SelectedPrice+(Symbol2_IncVal*4) :na , title='Symbol2 Line5',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol2_Pair == syminfo.ticker and ShowSymbol2 ? Symbol2_SelectedPrice-(Symbol2_IncVal*1) :na , title='Symbol2 Line-1',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol2_Pair == syminfo.ticker and ShowSymbol2 ? Symbol2_SelectedPrice-(Symbol2_IncVal*2) :na , title='Symbol2 Line-2',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol2_Pair == syminfo.ticker and ShowSymbol2 ? Symbol2_SelectedPrice-(Symbol2_IncVal*3) :na , title='Symbol2 Line-3',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol2_Pair == syminfo.ticker and ShowSymbol2 ? Symbol2_SelectedPrice-(Symbol2_IncVal*4) :na , title='Symbol2 Line-4',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol2_Pair == syminfo.ticker and ShowSymbol2 ? Symbol2_SelectedPrice-(Symbol2_IncVal*5) :na , title='Symbol2 Line-5',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)



///////////////////// - GJ -/////////////////////
ShowSymbol3 = input (false, title="Show GBPJPY Bank Levels", inline="5")
Symbol3_Pair = "GBPJPY" 
Symbol3 = security(Symbol3_Pair,timeframe.period,close)
Symbol3_SelectedPrice = input(title="Price", defval=152.500, type=input.float, inline="6") 
Symbol3_IncVal = input(title="Increment By +/-",  defval=.500, type=input.float, inline="6" , tooltip="0.5 = 50 Pips")
//Symbol 3 Draw lines
plot(Symbol3_Pair == syminfo.ticker and ShowSymbol3 ? Symbol3_SelectedPrice+(Symbol3_IncVal*0) :na , title='Symbol3 Line1',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol3_Pair == syminfo.ticker and ShowSymbol3 ? Symbol3_SelectedPrice+(Symbol3_IncVal*1) :na , title='Symbol3 Line2',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol3_Pair == syminfo.ticker and ShowSymbol3 ? Symbol3_SelectedPrice+(Symbol3_IncVal*2) :na , title='Symbol3 Line3',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol3_Pair == syminfo.ticker and ShowSymbol3 ? Symbol3_SelectedPrice+(Symbol3_IncVal*3) :na , title='Symbol3 Line4',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol3_Pair == syminfo.ticker and ShowSymbol3 ? Symbol3_SelectedPrice+(Symbol3_IncVal*4) :na , title='Symbol3 Line5',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol3_Pair == syminfo.ticker and ShowSymbol3 ? Symbol3_SelectedPrice-(Symbol3_IncVal*1) :na , title='Symbol3 Line-1',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol3_Pair == syminfo.ticker and ShowSymbol3 ? Symbol3_SelectedPrice-(Symbol3_IncVal*2) :na , title='Symbol3 Line-2',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol3_Pair == syminfo.ticker and ShowSymbol3 ? Symbol3_SelectedPrice-(Symbol3_IncVal*3) :na , title='Symbol3 Line-3',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol3_Pair == syminfo.ticker and ShowSymbol3 ? Symbol3_SelectedPrice-(Symbol3_IncVal*4) :na , title='Symbol3 Line-4',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol3_Pair == syminfo.ticker and ShowSymbol3 ? Symbol3_SelectedPrice-(Symbol3_IncVal*5) :na , title='Symbol3 Line-5',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)




///////////////////// - GU -/////////////////////
ShowSymbol4 = input (false, title="Show GBPUSD Bank Levels", inline="7")
Symbol4_Pair = "GBPUSD" 
Symbol4 = security(Symbol4_Pair,timeframe.period,close)
Symbol4_SelectedPrice = input(title="Price", defval=1.34100, type=input.float, inline="8") 
Symbol4_IncVal = input(title="Increment By +/-",  defval=0.005, type=input.float, inline="8" , tooltip="0.005 = 50 Pips")
//Draw lines
plot(Symbol4_Pair == syminfo.ticker and ShowSymbol4 ? Symbol4_SelectedPrice+(Symbol4_IncVal*0) :na , title='Symbol4 Line1',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol4_Pair == syminfo.ticker and ShowSymbol4 ? Symbol4_SelectedPrice+(Symbol4_IncVal*1) :na , title='Symbol4 Line2',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol4_Pair == syminfo.ticker and ShowSymbol4 ? Symbol4_SelectedPrice+(Symbol4_IncVal*2) :na , title='Symbol4 Line3',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol4_Pair == syminfo.ticker and ShowSymbol4 ? Symbol4_SelectedPrice+(Symbol4_IncVal*3) :na , title='Symbol4 Line4',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol4_Pair == syminfo.ticker and ShowSymbol4 ? Symbol4_SelectedPrice+(Symbol4_IncVal*4) :na , title='Symbol4 Line5',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol4_Pair == syminfo.ticker and ShowSymbol4 ? Symbol4_SelectedPrice-(Symbol4_IncVal*1) :na , title='Symbol4 Line-1',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol4_Pair == syminfo.ticker and ShowSymbol4 ? Symbol4_SelectedPrice-(Symbol4_IncVal*2) :na , title='Symbol4 Line-2',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol4_Pair == syminfo.ticker and ShowSymbol4 ? Symbol4_SelectedPrice-(Symbol4_IncVal*3) :na , title='Symbol4 Line-3',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol4_Pair == syminfo.ticker and ShowSymbol4 ? Symbol4_SelectedPrice-(Symbol4_IncVal*4) :na , title='Symbol4 Line-4',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol4_Pair == syminfo.ticker and ShowSymbol4 ? Symbol4_SelectedPrice-(Symbol4_IncVal*5) :na , title='Symbol4 Line-5',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)


///////////////////// - Custom -/////////////////////
ShowSymbol5 = input (false, title="Show Custom Bank Levels", inline="9")
Symbol5_Pair = input("OANDA:NAS100USD",title=" ", type=input.symbol, inline="9") 
Symbol5 = security(Symbol5_Pair,timeframe.period,close)
Symbol5_SelectedPrice = input(title="Price", defval=16100, type=input.float, inline="10") 
Symbol5_IncVal = input(title="Increment By +/-",  defval=50, type=input.float, inline="10" , tooltip="Decimal placement will vary by symbol")
//Draw lines
plot(Symbol5_Pair == syminfo.tickerid and ShowSymbol5 ? Symbol5_SelectedPrice+(Symbol5_IncVal*0) :na , title='Symbol5 Line1',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol5_Pair == syminfo.tickerid and ShowSymbol5 ? Symbol5_SelectedPrice+(Symbol5_IncVal*1) :na , title='Symbol5 Line2',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol5_Pair == syminfo.tickerid and ShowSymbol5 ? Symbol5_SelectedPrice+(Symbol5_IncVal*2) :na , title='Symbol5 Line3',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol5_Pair == syminfo.tickerid and ShowSymbol5 ? Symbol5_SelectedPrice+(Symbol5_IncVal*3) :na , title='Symbol5 Line4',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol5_Pair == syminfo.tickerid and ShowSymbol5 ? Symbol5_SelectedPrice+(Symbol5_IncVal*4) :na , title='Symbol5 Line5',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol5_Pair == syminfo.tickerid and ShowSymbol5 ? Symbol5_SelectedPrice-(Symbol5_IncVal*1) :na , title='Symbol5 Line-1',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol5_Pair == syminfo.tickerid and ShowSymbol5 ? Symbol5_SelectedPrice-(Symbol5_IncVal*2) :na , title='Symbol5 Line-2',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
plot(Symbol5_Pair == syminfo.tickerid and ShowSymbol5 ? Symbol5_SelectedPrice-(Symbol5_IncVal*3) :na , title='Symbol5 Line-3',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol5_Pair == syminfo.tickerid and ShowSymbol5 ? Symbol5_SelectedPrice-(Symbol5_IncVal*4) :na , title='Symbol5 Line-4',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)
//plot(Symbol5_Pair == syminfo.tickerid and ShowSymbol5 ? Symbol5_SelectedPrice-(Symbol5_IncVal*5) :na , title='Symbol5 Line-5',   linewidth=1, style=plot.style_line, color=color.new(color.gray,0), editable=true, trackprice=true)




// Code to add two ema to the chart.
// EmaShow = input (false, title="Show EMA" )
// EmaLength1 = input(50, minval=1, title="EMA 1 Length")  
// EmaSource1 = input(close, title="EMA 1 Source")
// EmaValue1 = ema(EmaSource1, EmaLength1)
// plot(EmaShow ? EmaValue1 :na , color=color.new(color.red,0), linewidth=2, title="EMA 1") 
// EmaLength2 = input(200, minval=1, title="EMA 2 Length")  
// EmaSource2 = input(close, title="EMA 2 Source") 
// EmaValue2 = ema(EmaSource2, EmaLength2)
// plot(EmaShow ? EmaValue2 :na , color=color.new(color.orange,0), linewidth=2, title="EMA 2")