bigmoney_wgb
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © sam307210

//@version=4
study("bigmoney")
VAR1 = ema(highest(high,500), 21)
VAR2 = ema(highest(high,250), 21)
VAR3 = ema(highest(high,90),21)
VAR4 = ema(lowest(low,500),21)
VAR5 = ema(lowest(low,250),21)
VAR6 = ema(lowest(low,90),21)
VAR7 = ema((VAR4*0.96+VAR5*0.96+VAR6*0.96+VAR1*0.558+VAR2*0.558+VAR3*0.558)/6,21)
VAR8 = ema((VAR4*1.25+VAR5*1.23+VAR6*1.2+VAR1*0.55+VAR2*0.55+VAR3*0.65)/6,21)
VAR9 = ema((VAR4*1.3+VAR5*1.3+VAR6*1.3+VAR1*0.68+VAR2*0.68+VAR3*0.68)/6,21)
VARA = ema((VAR7*3+VAR8*2+VAR9)/6*1.738,21)
VARB = low[1]
VARC = ema((abs(low-VARB)),3) / ema((max(low-VARB,0)),3)*10
VARD = ema(iff(close*1.35<=VARA,VARC*10,VARC/10),3)
VARE = lowest(low,30)
VARF = highest(VARD,30)
big_money = ema(iff(low<=VARE,(VARD+VARF*2)/2,0),3)/618
big_money1 = iff(big_money>0,big_money,0)


plot(big_money, title='bigmoneyline',color=color.blue)
plot(big_money1, title='bigmoney',color=color.red,linewidth=3,style=plot.style_histogram)




