Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Convert Tradestation Trend code to PCF Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Telework
Posted : Sunday, July 24, 2016 1:27:38 AM
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;

 

diceman
Posted : Sunday, July 24, 2016 9:56:13 AM
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

 

 

Telework
Posted : Sunday, July 24, 2016 8:22:26 PM
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.

Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.