[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Help on Say() in loop



PureBytes Links

Trading Reference Links

Friends,

Can any body please correct my following code?

text = O;
for (i=1; i < BarCount; i++)
{
   if (cond1[i] AND cond2[i])
   {
    text = "Fresh Buy on "+ FullName();
   }
    if (Cond17[i] AND cond3[i] AND cond4[i])
   {
    text = "Strong Buy on "+FullName();
   }
    if (Cond17[i] AND cond3[i])
   {
    text = "Buy on "+FullName();
   }
    if (Cond17[i] AND cond5[i])
   {
    text = "watch buy On "+FullName();
  }
   else;
}

function SayNotTooOften( text, Minperiod )
{
   elapsed=GetPerformanceCounter()/1000;
   Lastelapsed = Nz( StaticVarGet("lastsaytime") );

  if( elapsed - Lastelapsed > Minperiod )
   {
     StaticVarSet("lastsaytime", elapsed );
     
     Say( text );
   }
   
}

SayNotTooOften( text, 60 );

I keep hearing the last line irrespective of where I point the cursor. There seems to be some problem with my looping code.

Thanks and regards,

Raajesh



Bring your gang together. Do your thing. Find your favourite Yahoo! Group. __._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___