Page 1 of 1

paintbar Middle indicator

Posted: Fri Jun 16, 2006 12:48 am
by michal.kreslik
TheRumpledOne wrote:Had an idea...

Paintbar indicator for the middle trades.

Blue means go long/stay long.

Red means go short/stay short.

Yellow means wait/exit.

This is a real money maker on the EURUSD 60 minute chart.

MAY ALL YOUR DEALS BE ACCEPTED.





Code: Select all

[LegacyColorValue = true];

// _TRO_PB_MIDDLE
   

{Attn: TradeStation
if this indicator is posted on the TradeStation Forum, I, TheRumpledOne, did NOT post it there,
so I can't be blamed for this indicator having my contact info.}


{Programmer:  Avery T. Horton, Jr.  aka TheRumpledOne,
gifts and donations accepted, PO Box 43575, Tucson, AZ 85733 }

{ © Copyright 2006 Avery T. Horton, Jr.}

inputs:
   
BarWidth(2),

iMiddle( (High + Low) * .50 ),


iLgColor(blue),
iShColor(magenta),
iWaitColor(yellow);
 
 
 
variables:
 
tMid(""),
tMsg(""),

   PLTop( 0 ),
   PLBottom( 0 ),

   DayTop( 0 ),
   DayBottom( 0 ),
   DayHigh( 0 ),    
   PrevMid( 0 ),
   DayLow( 0 ),

xPeriods(60),
xInterval(0),

sFirstPass(true),
 
xBars(0),   

xInd(0),
tInd(""),
tAlert("");

variables: 
   
PBcolor(white);
   

 
   
 
   

{ INITIALIZE }
 

PBcolor = WHITE;
 
{ PROCESSING }
 
PrevMid =  iMiddle[1] ;
 
 
{ Alert criteria }

 
{


If CLOSE CROSSES ABOVE PrevMid
or CLOSE > PrevMid
then begin
   PBcolor = iLgColor;
end
else
If CLOSE CROSSES below PrevMid
or CLOSE < PrevMid
then begin
   PBcolor = iShColor;
end
else begin
   PBcolor = iWaitColor;
end;
}


If CLOSE > iMiddle
and CLOSE > PrevMid
then begin
   PBcolor = iLgColor;
end
else
If CLOSE < iMiddle
and CLOSE < PrevMid
then begin
   PBcolor = iShColor;
end
else begin
   PBcolor = iWaitColor;
end;

 

{ PLOT }


plotPB(high,low,"TRO-MIDDLE",PBcolor);
SetPlotWidth(1,BarWidth);
SetPlotColor(1,PBcolor);