Registered User Joined: 1/12/2011 Posts: 183
|
I'm wondering if there is anyone with the expertise to convert some Tradestation code that I came across to a PCF format that could be represented as a dot indicator in TC2000.
If you have the expertise please help me out with this as I am working on some ideas for MTF style indicators in both TC2000 and TOS. I'm just concerned with the primary formula and not the extraneous parts on how to paint bars, etc.
Here is the Tradestation code:
{ Heikin Ashi PaintBarStudy }
{ for visualization of trend }
inputs: UpColor( RGB(0,255,0)),
DnColor( RGB(255,0,0) ),
help(”www.TazaTek.com”);
vars: haClose(0),
haOpen(0),
haHigh(0),
haLow(0),
color(0);
if BarNumber = 1 then
begin
haOpen = open;
haClose = (O+H+L+C)/4;
haHigh = MaxList( high, haOpen, haClose);
haLow = MinList( low, haOpen,haClose);
end;
if BarNumber > 1 then
begin
haClose = (O+H+L+C)/4;
haOpen = (haOpen [1] + haClose [1])/2 ;
haHigh = MaxList(High, haOpen, haClose) ;
haLow = MinList(Low, haOpen, haClose) ;
if haClose > haOpen then
color = UpColor
else
color = DnColor;
plotPB(haOpen,haClose,”Ignore-ME-”,color);
SetPlotWidth(1,4);
SetPlotColor(1,color);
end;
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
This program (there are some errors in it after transfer to Worden forum)
just converts "regular price" bars to "HA" bars.
You will get the same result if you select "HA" candles as your price plot in Telechart.
Thanks
|
Registered User Joined: 1/12/2011 Posts: 183
|
OK, I understand. I thought there was something more to it and it was providing a trend indicator of some kind.
|