PureBytes Links
Trading Reference Links
|
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 <adheerp@xxxxxxxxxxx> 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.
>
>
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.15.6/568 - Release Date: 12/4/2006 3:20 PM
|