to use normally
xyz = iif(Month()==1,10,20);

to use within a loop
m = month();
for( iBar = 0; iBar < BarCount ; ++iBar )
{
   // Here do something if the month is January ....
   if( m[ibar]== 1 )


--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com


On 03/12/06, Adheer Pai <[EMAIL PROTECTED]> wrote:

 Hello,

I have a question regarding date-time functions for a specific bar.

How do I find the day / month / year for the specified bar ? The Month(),
Year(), Day() functions do not take parameters.

For example, in this sample code I want to do specific operations if the
month is January ...

Any trick ?
// ---- SAMPLE CODE BEGIN ------------

for( iBar = 0; iBar < BarCount ; ++iBar )
{
    // Here do something if the month is January ....
    if( MONTH_OF_THIS_BAR == 1 )
    {
        // Do something ..
    }
}

// ---- SAMPLE CODE END ---------------

Thanks in advance,
Adheer Pai.


Reply via email to