// Var Name: "BollingerBands_Top" contains Bollinger Bands(20,2).Top
// Var Name: "PriceChannels_Top" contains Price Channels(20).Top
// Var Name: "PriceChannels_Bottom" contains Price Channels(20).Bottom
// Var Name: "BollingerBands_Bottom" contains Bollinger Bands(20,2).Bottom
// Var Name: "VWAP_Line" contains VWAP (Intraday)().Line
// Var Name: "PriceChannels_Center" contains Price Channels(20).Center
// Var Name: "FibonacciPivots_Res1" contains Fibonacci Pivots (Intraday)(def).Res1
// Var Name: "RSI_Line" contains RSI(20,2).Line
// Var Name: "CCI_Line" contains CCI(14).Line
public void MainCalculation()
{DefinePaintbarParameter("MINVOL", "Bar Volume", true,0, 1000000000000, 1000, 15000);
if (BarVolume<GetPaintbarParameter("MINVOL"))
return;
if (Close > BollingerBands_Top)
{
SetColorAndShape(SysColor.MainIndicator2, PBShape.Rectangle);
SetScanResult("Boll UP");
return;
}
if (Close > PriceChannels_Top)
{
SetColorAndShape(SysColor.MainIndicator2, PBShape.ArrowNE);
SetScanResult("Donchiian Upp");
return;
}
if (Close < PriceChannels_Bottom)
{
SetColorAndShape(SysColor.MainIndicator7, PBShape.ArrowSE);
SetScanResult("Donchiian Down");
return;
}
if (Close < BollingerBands_Bottom)
{
SetColorAndShape(SysColor.MainIndicator7, PBShape.Rectangle);
SetScanResult("Boll Down");
return;
}
if (Close.CrossesUp(VWAP_Line, 0))
{
SetColorAndShape("Vwap", PBShape.W, SysColor.MainIndicator1);
SetScanResult("VWAP UP");
return;
}
if (Close.CrossesUp(PriceChannels_Center, 0))
{
SetColorAndShape(SysColor.MainIndicator2, PBShape.ArrowNE_Hollow);
SetScanResult("Donchian center cross");
return;
}
if (Close.Crosses(FibonacciPivots_Res1, 0))
{
SetColorAndShape(SysColor.Annotations, PBShape.TriangleUp_Hollow);
SetScanResult("Cross fib Resist");
return;
}
if (RSI_Line < 30)
{
SetColorAndShape(SysColor.MainIndicator3, PBShape.Circle);
SetScanResult("Oversold");
return;
}
if (BarVolume > BarVolume[1])
{
SetColorAndShape(SysColor.MainIndicator5, PBShape.ArrowUp);
SetScanResult("Vol UP");
return;
}
if (CCI_Line.CrossesUp(-150, 0))
{
SetColorAndShape("CCI", PBShape.C, 0xFF0A54FF);
SetScanResult("CCI -150 up");
return;
}
}