buy zone for tradestation 2000i

If you don't know where to start, start here! Don't be afraid to ask questions.

Moderator: moderators

italiantrader
rank: <50 posts
rank: <50 posts
Posts: 12
Joined: Thu May 17, 2007 11:58 am
Reputation: 0
Gender: None specified

buy zone for tradestation 2000i

Postby italiantrader » Sun Nov 04, 2007 2:48 pm

Hi to everybody, I'm an italian boy. Congratulation for Michal and for his indicators. I wanted to ask if there is an hope for make work buy zone in tradestation 2000i, for make the buy zone readable also in that version.
Byeee.

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 15544
Joined: Sun May 14, 2006 9:31 pm
Reputation: 3035
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Sun Nov 04, 2007 4:03 pm

I think I posted my buyzone code in text form.
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!

Please do NOT PM me with trading or coding questions, post them in a thread.

italiantrader
rank: <50 posts
rank: <50 posts
Posts: 12
Joined: Thu May 17, 2007 11:58 am
Reputation: 0
Gender: None specified

Postby italiantrader » Sun Nov 04, 2007 6:58 pm

I searched a lot before starting this topic but I didn't find it. When u have time, can you please post it? I hope all the words will be recognised from my old easylanguage.
Many thanks again.

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 15544
Joined: Sun May 14, 2006 9:31 pm
Reputation: 3035
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Sun Nov 04, 2007 7:52 pm

Code: Select all

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


inputs:
   
iDecimals(2),

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}

//   Displace_Label( -20 ),
   
   ShortBotColor( red),
   ShortTopColor( red),
   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:
   
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),

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



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

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


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

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


TL_TextTime = AddTime( Time , 2 * BarInterval ) ;

{*************************************************}

if BarType <= 1 then { ie, if minute or tick bars }
   begin
      
   if Date <> Date[1] and    Date = LastCalcDate then { ie, if new day }
      begin

      { truncate the previous lines if they exist }
      if HavePrevLines then
         begin
         TL_SetEnd( TLShortTop, Date[1], Time[1], ShortTop ) ;
         TL_SetEnd( TLLongTop, Date[1], Time[1], LongTop ) ;
         TL_SetEnd( TLLongBot, Date[1], Time[1], LongBot ) ;
         TL_SetEnd( TLShortBot, Date[1], Time[1], ShortBot) ;
         TL_SetExtRight( TLShortTop, false ) ;
         TL_SetExtRight( TLLongTop, false ) ;
         TL_SetExtRight( TLLongBot, false ) ;
         TL_SetExtRight( TLShortBot, false ) ;

         end ;

{ re-initialize O,H,L for the new day }

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

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

{ insert the new O,H,L lines and set their colors/extents }

      TLShortTop = TL_New( Date[1], Time[1], ShortTop, Date, Time, ShortTop ) ;
      TLLongTop = TL_New( Date[1], Time[1], LongTop, Date, Time, LongTop ) ;
      TLLongBot = TL_New( Date[1], Time[1], LongBot, Date, Time, LongBot ) ;
      TLShortBot = TL_New( Date[1], Time[1], ShortBot, Date, Time, ShortBot ) ;

      TL_SetColor( TLShortTop, ShortTopColor ) ;
      TL_SetColor( TLLongTop, LongTopColor ) ;
      TL_SetColor( TLLongBot, LongBotColor ) ;
      TL_SetColor( TLShortBot, ShortBotColor ) ;

      
      TL_SetStyle(TLLongTop,TLStyle);
      TL_SetStyle(TLLongBot,TLStyle);
      TL_SetStyle(TLShortTop,TLStyle);
      TL_SetStyle(TLShortBot,TLStyle);


      TL_SetExtLeft( TLShortTop, false ) ;
      TL_SetExtLeft( TLLongTop, false ) ;
      TL_SetExtLeft( TLLongBot,false ) ;
      TL_SetExtLeft( TLShortBot,false ) ;

      TL_SetExtRight( TLShortTop, true ) ;
      TL_SetExtRight( TLLongTop, true ) ;
      TL_SetExtRight( TLLongBot, true ) ;
      TL_SetExtRight( TLShortBot, true ) ;

      { set flag }
      if HavePrevLines = false then
         HavePrevLines = true ;
      end;
end ;


If textShortBot > 0
   then value9      = Text_Delete( textShortBot ) ;

      textShortBot = Text_New(Date, TL_TextTime ,ShortBot,"ShortBot ("+ NumToStr(ShortBot,iDecimals )+")");
      Text_SetStyle(textShortBot, TL_Text_HVal , TL_Text_VVal );
      Text_SetColor(textShortBot, ShortBotColor );
      Text_SetLocation( textShortBot , date , TL_TextTime , ShortBot );

If textShortTop > 0
   then value9      = Text_Delete( textShortTop) ;

      textShortTop = Text_New(Date,  TL_TextTime  ,ShortTop,"ShortTop ("+ NumToStr(ShortTop, iDecimals )+")");
      Text_SetStyle(textShortTop, TL_Text_HVal , TL_Text_VVal  );  //   HVal: 0=left, 1=right, 2=centered, / VVal: 0=Top, 1=Bottom, 2=Centered
      Text_SetColor(textShortTop, ShortTopColor );
      Text_SetLocation( textShortTop , date , TL_TextTime , ShortTop );

If textLongTop > 0
   then value9      = Text_Delete( textLongTop) ;

      textLongTop = Text_New(Date,   TL_TextTime ,LongTop,"LongTop ("+ NumToStr(LongTop, iDecimals )+")");
      Text_SetStyle(textLongTop, TL_Text_HVal , TL_Text_VVal  );  //   HVal: 0=left, 1=right, 2=centered, / VVal: 0=Top, 1=Bottom, 2=Centered
      Text_SetColor(textLongTop, LongTopColor );
      Text_SetLocation( textLongTop , date , TL_TextTime , LongTop );

If textLongBot > 0
   then value9      = Text_Delete( textLongBot ) ;

      textLongBot = Text_New(Date,  TL_TextTime ,LongBot,"LongBot ("+ NumToStr(LongBot,iDecimals )+")");
      Text_SetStyle(textLongBot,TL_Text_HVal , TL_Text_VVal  );  //   HVal: 0=left, 1=right, 2=centered, / VVal: 0=Top, 1=Bottom, 2=Centered
      Text_SetColor(textLongBot, LongBotColor );
      Text_SetLocation( textLongBot , date , TL_TextTime , LongBot );
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!



Please do NOT PM me with trading or coding questions, post them in a thread.

4x=0
rank: 150+ posts
rank: 150+ posts
Posts: 410
Joined: Tue Oct 17, 2006 10:53 pm
Reputation: 1
Gender: Male

Postby 4x=0 » Sun Nov 04, 2007 8:05 pm

Please post the MT4 version!

TRO, work with me on creating the ultimate MT4 buy zone indicator! Can you imagine how popular it would be?

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.

4x=0
rank: 150+ posts
rank: 150+ posts
Posts: 410
Joined: Tue Oct 17, 2006 10:53 pm
Reputation: 1
Gender: Male

Postby 4x=0 » Sun Nov 04, 2007 8:50 pm

Im seriously,

1. 4x=0 obtains custom MT4 buy zone line plotter (this is key)

2. 4x=0 trades the buy zone and posts results on kreslik.com

3. Traders from all over want to trade buy zone like 4x=0

4. Traders download, talk about, and use buy zone for MT4 by TRO

5. TRO becomes immensely popular

6. TRO sells more ebooks!


Don't let this opportunity pass you by!

4x=0

italiantrader
rank: <50 posts
rank: <50 posts
Posts: 12
Joined: Thu May 17, 2007 11:58 am
Reputation: 0
Gender: None specified

Postby italiantrader » Sun Nov 04, 2007 9:27 pm

Thanks, but easylanguage doesn't ricognise dailyopen, addtime and BarType :(

User avatar
TheRumpledOne
rank: 10000+ posts
rank: 10000+ posts
Posts: 15544
Joined: Sun May 14, 2006 9:31 pm
Reputation: 3035
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender: None specified
Contact:

Postby TheRumpledOne » Sun Nov 04, 2007 10:17 pm

4x=0 wrote:Please post the MT4 version!

TRO, work with me on creating the ultimate MT4 buy zone indicator! Can you imagine how popular it would be?


Didn't Accrete already do that?
IT'S NOT WHAT YOU TRADE, IT'S HOW YOU TRADE IT!



Please do NOT PM me with trading or coding questions, post them in a thread.

4x=0
rank: 150+ posts
rank: 150+ posts
Posts: 410
Joined: Tue Oct 17, 2006 10:53 pm
Reputation: 1
Gender: Male

Postby 4x=0 » Sun Nov 04, 2007 10:41 pm

Why do You think Accrete created buy zone for MT4? I don't see it.

:smt017

We need a *new* Buy Zone indicator. Not the old one.

What would make the new one "new" besides being for MT4, are the ideas I have for it.

1. simplified structure of the zones 2. zones for each open 3. color codes 4. any other ideas I may have.

It would be complete madness after a thread was going with results of this new indicator by TRO !

4x=0
rank: 150+ posts
rank: 150+ posts
Posts: 410
Joined: Tue Oct 17, 2006 10:53 pm
Reputation: 1
Gender: Male

Postby 4x=0 » Mon Nov 05, 2007 1:38 am

TRO, on my live account I just took this buy zone trade short on USDJPY with 8 lots, netting 4 pips.



Good Stuff :smt023

Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.


Return to “beginners forum”