Wednesday, May 27, 2009

Hourly Volume TradeStation Code

Here is a TradeStation Paintbar study to help distinguish which hourly bar total volume ($TVOL) is in. First hour heavy volume days are said to be more likely to trend. Cheers, Jeff

//Each Hourly Bar Assigned a Different Color by Market Rewind

Variable: BarCount(0), CustomColor(0);

If Date <> Date[1] Then BarCount = 1 Else BarCount = BarCount + 1;

If BarCount = 1 then CustomColor = DarkRed;
If BarCount = 2 then CustomColor = Red;
If BarCount = 3 then CustomColor = Yellow;
If BarCount = 4 then CustomColor = Cyan;
If BarCount = 5 then CustomColor = Blue;
If BarCount = 6 then CustomColor = Green;
If BarCount = 7 then CustomColor = DarkGreen;

PlotPaintBar( High, Low, "CustomColor", CustomColor ) ;

No comments: