Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

mrb123

Members
  • Content Count

    1
  • Joined

  • Last visited

Everything posted by mrb123

  1. Hi all; I am having trouble converting this code so it displays correctly for a paintbar. Any help is greatly appreciated! Here is the code: Inputs: TransColor1or2or3(2), UseZeroLag(True), Price(smoothedaverage(close,2)), Length(21), CCIlong(150), CCIshort(-150), UpColor(Green), DwnColor(Red); Vars: Dir(0), Dir1(0), ZL1(0), VS(2); ZL1 = ZeroLag(CCI(Length),Length); If UseZeroLag = False then Plot3(CCI(Length),"CCI"); If UseZeroLag = True then Plot3(ZL1,"CCI"); Plot4(0, "ZeroLine"); If Plot3>Plot3[1] Then Dir=1; If Plot3<Plot3[1] Then Dir=-1; If UseZeroLag = False and (CCI(Length)) > 0 Then Begin; Plot1(CCI(Length), "CCI-BuyZone",UpColor); End; If UseZeroLag = False and (CCI(Length)) < 0 Then Begin; Plot2(CCI(Length), "CCI-SellZone",DwnColor); End; If UseZeroLag = True and ZL1 > 0 Then Begin; Plot1(ZL1, "CCI-BuyZone",UpColor); If UseZeroLag = True and ZL1 > 0 Then Alert ("BUY CCI"); End; If UseZeroLag = True and ZL1 < 0 Then Begin; Plot2(ZL1, "CCI-SellZone",DwnColor); If UseZeroLag = True and ZL1 < 0 Then Alert ("SELL CCI"); End;
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.