Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 10-10-2008, 12:01 PM   #1

Join Date: Dec 2007
Location: Hamilton
Posts: 1
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Question Convert CCI Code into a Paintbar TS2000i

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(clo se,2)),
Length(21),
CCIlong(150),
CCIshort(-150),
UpColor(Green),
DwnColor(Red);

Vars: Dir(0), Dir1(0), ZL1(0), VS(2);

ZL1 = ZeroLag(CCI(Length),Lengt h);

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;
mrb123 is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trend Indicator Paintbar Squire69 Coding Forum 12 08-15-2010 05:11 PM
Need Help Convert This MACD to Ninjatrader vt007 Coding Forum 0 09-06-2008 06:09 AM
Need Help in Convert This MACD to Multichart theman Coding Forum 3 06-01-2008 09:03 AM
Up and DownTicks PaintBar jojojo Coding Forum 0 11-15-2007 04:05 AM
Simple Paintbar Request MrPaul Coding Forum 4 06-20-2007 08:10 PM

All times are GMT -4. The time now is 12:03 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.