Page 1 of 3

TRO_BuyZone_PMSM

Posted: Fri Jun 22, 2007 4:05 pm
by TheRumpledOne
TRO_BuyZone_PMSM



_TRO_BuyZone_PMSM is the Poor Man's Slot Machine version of the Buy Zone.

Some traders are still having trouble with the Buy Zone, so I wrote _TRO_BuyZone_PMSM to make it even simpler:

If top row dot is GREEN, go long.

If top row dot is RED, go short.

The bottom row dot corresponds to the daily candle color. Be careful when you trade against the daily candle color. Take profits quick.

Just to be 100% crystal clear - use this on a 5 minute chart and DO NOT wait for the candle to close!! When you see a red or green dot, that's the entry trigger.

Start out by taking tiny profits like a nickel or dime until you get the hang of it.

ELD attached.

Posted: Sat Jun 23, 2007 3:45 am
by orion1012
Hi TRO, Can you post the ELA code I have TS 2000i and cant load ELD's.

Thanks

Posted: Sat Jun 23, 2007 6:15 pm
by TheRumpledOne

Code: Select all

{ _TRO_BuyZone_PMSM }
   

{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 2007 Avery T. Horton, Jr.}


// Value1 = GetAppInfo(aiApplicationType);        // returns a value that identifies the calling window type

// cUnknown = 0 cChart = 1  cRadarScreen = 2 cOptionStation = 3


inputs:
iDecimals(2),
iOpen(dailyopen),   
iOpenBuyZone(.1),
   
iBuyZoneHI(.2),           {inside ask must be <= (OPEN + iBuyZoneHI) to place buy order}
iBuyZoneLO(.2),          {inside bid must be >= (OPEN - iBuyZoneLO) to place buy order}

iPlotOpen(true),
 
   
   ShortBotColor( red),
   ShortTopColor( red),
   OpenColor(white),
   LongTopColor( blue),
   LongBotColor( blue) ,

TLSize( 0),        // 0 - 6 for thin to thick
TLStyle( 2),      //  1 = solid, 2 = dashed, 3 = dotted, 4 = dashed 2, 5 = dashed 3

TL_Text_HVal ( 0) ,    // HVal: 0=left, 1=right, 2=centered,
TL_Text_VVal ( 1) ;   //  VVal: 1=Top, 0=Bottom, 2=Centered
 
   
variables:

FG1(white),
BG1(black),

FG2(white),
BG2(black),

FG3(white),
BG3(black),

FG4(white),
BG4(black),


   PrevSessionDate( 0 ),
   PrevSessionTime(0),
   PrevSessionHigh( 0 ),
   PrevSessionLow( 0 ),
   PrevSessionClose( 0 ),
   PrevSessionMid( 0 ),
   PrevSessionOpen( 0 ),   
   SessionDate( 0 ),
   SessionTime(0),
   SessionOpen( 0 ),
   SessionClose( 0 ),
   SessionHigh( 0 ),
   SessionLow( 0 ),
   PrevSession(999999),
 

Candle(0),
CandleDaily(0),
ShortDiff( 0 ),
LongDiff( 0 ),
tShortDiff( "" ),
tLongDiff( "" ),
BuyZone( 0 ),
xBuyZone(0),
tBuyZone(""),


sSession(false),


sFirstPass(true),
xAppType(0),

TL_TextTime( 0 ),    
 

xDailyOpen(0),

xBuyZoneHI(0),           {inside ask must be <= (OPEN + iBuyZoneHI) to place buy order}
xBuyZoneLO(0),          {inside bid must be >= (OPEN - iBuyZoneLO) to place buy order}

textShortBot(0),
textShortTop(0),

textLongTop(0),
textLongBot(0),

textOpen(0),

TLOpen( 0 ),

   HavePrevLines( false ),
   TLShortTop( 0 ),
   TLLongTop( 0 ),
   TLLongBot( 0 ),
   TLShortBot( 0 ),
   ShortBot( 0 ),
   ShortTop( 0 ),
   LongTop( 0 ),
   LongBot( 0 ) ;

{commentary variables}
      
variables:
         
xcomm(0),
oComm1( "" ),    
oComm2( "" ),    
oComm3( "" ),    
oComm4( "" ),    
oComm5( "" ),
oComm6( "" ),
oComm7( "" ),
oComm8( "" ),
oComm9( "" ),    
oComm10( "" );
   
 


{first time through}

if sFirstPass
then begin
   
sFirstPass = false;

xAppType = GetAppInfo(aiApplicationType);        // cUnknown = 0 cChart = 1  cRadarScreen = 2 cOptionStation = 3

end; {if sFirstPass}


{ INITIALIZE }

FG1 = WHITE;
BG1 = BLACK;

fg2 = WHITE;
bg2 = BLACK;

fg3 = WHITE;
bg3 = BLACK;

fg4 = WHITE;
bg4 = BLACK;

{*************************************************}
{    C A L C U L A T I O N S                      }
{*************************************************}

Commentary(" ");

Commentary("CurrentSession(0)  = ", numtostr( CurrentSession(0), 0 ) , NewLine);
Commentary("PrevSession  = ", numtostr( PrevSession, 0 ) , NewLine);

sSession = false ;

if CurrentSession(0) <> PrevSession
then begin
   
   sSession        = true ;
   PrevSessionOpen  = SessionOpen;
   PrevSessionDate  = SessionDate;
   PrevSessionTime  = SessionTime;
   PrevSessionClose = close[1];
   PrevSessionHigh  = SessionHigh;
   PrevSessionLow   = SessionLow;

   SessionDate      = date;
   SessionTime       = time;
    SessionOpen      = iOpen;
    SessionHigh      = iOpen;
   SessionLow       = iOpen;
   PrevSession      = CurrentSession(0);
   PrevSessionMid   = ( PrevSessionHigh + PrevSessionLow ) * .50  ;

end; // if CurrentSession(0) <> PrevSession

if High > SessionHigh then
SessionHigh = High ;

if Low < SessionLow then
SessionLow = Low ;

 
if d <> currentdate
   then xDailyOpen = Opend(0) 
   else xDailyOpen = SessionOpen ;
 
   
// xDailyOpen = SessionOpen ;

LongTop      = xDailyOpen + iBuyZoneHI;
LongBot      = xDailyOpen + iOpenBuyZone;

ShortTop   = xDailyOpen - iOpenBuyZone;
ShortBot   = xDailyOpen - iBuyZoneLO;

ShortDiff   = ShortTop - close  ;
LongDiff   = close - LongBot  ;

tShortDiff   = numtostr( ShortDiff , iDecimals ) ;
tLongDiff   = numtostr( LongDiff , iDecimals ) ;





candle = close - open ;

//CandleDaily = close - closeD(1)  ;
CandleDaily = close - PrevSessionClose  ;
   
{ Alert criteria }


If candle    > 0
then begin
   Fg3 = BLACK;
   Bg3 = green;
end
else
If candle    < 0
then begin
   Fg3 = BLACK;
   Bg3 = red;
end
else
begin
   Fg3 = yellow;
   Bg3 = BLACK;
end;

If CandleDaily    > 0
then begin
   Fg4 = BLACK;
   Bg4 = green;
end
else
If CandleDaily    < 0
then begin
   Fg4 = BLACK;
   Bg4 = red;
end
else
begin
   Fg4 = yellow;
   Bg4 = BLACK;
end;

If close < xdailyopen
and close > ShortTop
then begin
   tBuyZone = "Wait " + tShortDiff ;
   FG1 = RED;
   BG1 = YELLOW;
end
else
If close > xdailyopen
and close < LongBot
then begin
   tBuyZone = "Wait " + tLongDiff ;
   FG1 = BLACK;
   BG1 = YELLOW;
end;
   
If close > LongTop
then begin
   tBuyZone = "ABOVE " + tLongDiff ;
   FG1 = GREEN;
   BG1 = BLACK;
end
else
   
If close < ShortBot
then begin
   tBuyZone = "BELOW " + tShortDiff ;
   FG1 = RED;
   BG1 = BLACK;
end
else
   
If close > LongBot
and close <= LongTop
and close > open
then begin
   tBuyZone = "BUY " + tLongDiff ;
   FG1 = BLACK;
   BG1 = green;
end
else
   
If close >= ShortBot
and close < ShortTop
and close < open
then begin
   tBuyZone = "SHORT " + tShortDiff ;
   FG1 = BLACK;
   BG1 = red;
end;

 
{ PLOTS }

Plot1( .50, "BuyZone", bg1 ) ;
SetPlotBGColor( 1, bg1);
 

// Plot3( 0, "candle", bg3 ) ;
 
Plot4( -.50, "Daily candle", bg4 ) ;



xComm = _fCommentary(oComm1, oComm2, oComm3, oComm4, oComm5, oComm6, oComm7, oComm8, oComm9, oComm10);

CommentaryCl(oComm1 );

CommentaryCl(oComm2 );
CommentaryCl(oComm3 );
CommentaryCl(oComm4 );
CommentaryCl(oComm5 );
CommentaryCl(oComm6 );
CommentaryCl(oComm7 );
CommentaryCl(oComm8 );
CommentaryCl(oComm9 );
CommentaryCl(oComm10 );

Commentary(" ");
CommentaryCl( "CurrentDate: ", ELDateToString(CurrentDate) );
CommentaryCl( "Date: ", ELDateToString(Date) );
Commentary("CurrentSession(0)  = ", numtostr( CurrentSession(0), 0 ) , NewLine);

Commentary(" ");

Commentary("Prev.Open  = ", numtostr( PrevSessionOpen,iDecimals) , NewLine);
Commentary("Prev.High  = ", numtostr( PrevSessionHigh,iDecimals) , NewLine);
Commentary("Prev.Low   = ", numtostr( PrevSessionLow,iDecimals) , NewLine);
Commentary("Prev.Close = ", numtostr( PrevSessionClose,iDecimals) , NewLine);
Commentary("Prev.Mid   = ", numtostr( PrevSessionMid,iDecimals) , NewLine);

Commentary(" ");

Commentary("Open   = ", numtostr( Open,iDecimals) , NewLine);
Commentary("Opend(0)  = ", numtostr( Opend(0),iDecimals) , NewLine);
Commentary("xdailyopen  = ", numtostr( xdailyopen ,iDecimals) , NewLine);
Commentary("SessionOpen  = ", numtostr( SessionOpen ,iDecimals) , NewLine);

Commentary(" ");

Commentary("LongTop   = ", numtostr( LongTop,iDecimals) , NewLine);
Commentary("LongBot   = ", numtostr( LongBot,iDecimals) , NewLine);
Commentary("ShortTop   = ", numtostr( ShortTop,iDecimals) , NewLine);
Commentary("ShortBot   = ", numtostr( ShortBot,iDecimals) , NewLine);


Commentary("iOpenBuyZone   = ", numtostr( iOpenBuyZone,iDecimals) , NewLine);
Commentary("iBuyZoneHI   = ", numtostr( iBuyZoneHI,iDecimals) , NewLine);
Commentary("iBuyZoneLO   = ", numtostr( iBuyZoneLO,iDecimals) , NewLine);

Posted: Sun Jun 24, 2007 5:58 pm
by vittorio
he bottom row dot corresponds to the daily candle color. Be careful when you trade against the daily candle color. Take profits quick.


Hi TRO,

Is it difficult to add in the _TRO_BuyZone_PMSM:
another(s) bottom row dot corresponds to the Hourly candle color ?
Like your esignal TRO_sm_candle_color .
(see http://kreslik.com/forums/viewtopic.php ... sc&start=0
)


Thank you
Vittorio

Posted: Sun Jun 24, 2007 6:17 pm
by TheRumpledOne
vittorio wrote:
he bottom row dot corresponds to the daily candle color. Be careful when you trade against the daily candle color. Take profits quick.


Hi TRO,

Is it difficult to add in the _TRO_BuyZone_PMSM:
another(s) bottom row dot corresponds to the Hourly candle color ?
Like your esignal TRO_sm_candle_color .
(see http://kreslik.com/forums/viewtopic.php ... sc&start=0
)


Thank you
Vittorio


Difficult? LOL.

You would have to add DATA2 for the 60 minute candle and then reference DATA2 in the code.

Posted: Sun Jun 24, 2007 7:21 pm
by scalperT
Darn Avery, when I saw the first one, I had wondered why you had not incorporated the 60 in there also. Looks like others wondered too.

That chart is a thing of beauty! I only wish my charts looked that nice. I am beginning to waver a bit! I am thinking about opening a trial TS account to make use of those beautifull charts.

The difference would be $3.00 per side versus $8 per side on 1000 shares. However, since I also pay ECN fees, it may not be that bad. Also, I would easily meet the 5000 shares per month minimum, so I would get the free platform. It may just even out.

I just hope the pirates here don't force me to walk the plank if I open an account. If I do sign up, I will tell them you refered me, that should give them a sense of guilt.

Lastly, is it just me, or do some of those 5 minute dots appear yellow? Also, I trade against the daily constantly. I do not understand the signifigance of including the daily? I am just using the 60 and 5 with no problems.

Posted: Sun Jun 24, 2007 7:30 pm
by scalperT
Oops, I meant to post this on the TRO BUYZONE PMSM2 thread.

Posted: Sun Jun 24, 2007 10:34 pm
by TheRumpledOne
tjmxxx wrote:Darn Avery, when I saw the first one, I had wondered why you had not incorporated the 60 in there also. Looks like others wondered too.

That chart is a thing of beauty! I only wish my charts looked that nice. I am beginning to waver a bit! I am thinking about opening a trial TS account to make use of those beautifull charts.

The difference would be $3.00 per side versus $8 per side on 1000 shares. However, since I also pay ECN fees, it may not be that bad. Also, I would easily meet the 5000 shares per month minimum, so I would get the free platform. It may just even out.

I just hope the pirates here don't force me to walk the plank if I open an account. If I do sign up, I will tell them you refered me, that should give them a sense of guilt.

Lastly, is it just me, or do some of those 5 minute dots appear yellow? Also, I trade against the daily constantly. I do not understand the signifigance of including the daily? I am just using the 60 and 5 with no problems.



The reason I didn't do it the first time was it would require data 1 and data 2 and not everyone understands how to insert a second symbol.

But, since you asked, I wrote it and just included the workspace in my upload.

The daily is a "bias". So if it is RED, then it's a down day, and I look for short opportunities. If GREEN, up day, and I look for longs. With AAPL and currencies, it's a good rule of thumb.

Of course, I also look to the previous day's middle to determine a bias.

But let's not complicate matters. Using any ONE of those can be profitable if you stick to the rules.

Funny thing is, I have never told anyone not to use TradeStation. I just point out how they treat people on their forums, that's all. If TS ever reactivates my account, I would use it to trade AAPL. But I use EFX for Forex. TS still uses GAIN and fixed spreads and I know better than to trade on a fixed spread platform.

The yellow dots are the trade trigger dots NOT the 5 minute candle color... yellow means "get ready because a trade may appear soon".

Posted: Wed Jun 27, 2007 3:34 am
by scalperT
Ahh----very interesting! Those yellow dots mean get ready. Geez Avery, I think you have simplified this down enough to where a chimp should be able to trade profitably.

If somone needs more than this, trading may not be right for them.

Posted: Wed Jun 27, 2007 4:05 am
by TheRumpledOne
tjmxxx wrote:Ahh----very interesting! Those yellow dots mean get ready. Geez Avery, I think you have simplified this down enough to where a chimp should be able to trade profitably.

If somone needs more than this, trading may not be right for them.


The BuyZone indicator for radar has been flashing YELLOW for years!...lol

That's how you can pick off stocks all day long.