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

RE: [amibroker] Associating the correct date with barindex


  • Date: Sun, 21 Feb 2010 15:17:04 -0800
  • From: "ta" <tagroups@xxxxxxxxxxxxx>
  • Subject: RE: [amibroker] Associating the correct date with barindex

PureBytes Links

Trading Reference Links



Thanks again, it does work. I missed the fact that I was not compressing the datetime array. I was just compressing closing price to monthly.

 

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Anthony Faragasso
Sent: Sunday, February 21, 2010 1:43 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Associating the correct date with barindex

 

 

This worked for me...I changed the ticker to test it..opened log window and turned on Internal trace ...

TimeFrameSet( inMonthly );

dt = DateTime();

SetForeign( "S" );

Eq = Close;

TimeFrameRestore();

for ( i = 0 ; i < BarCount ; i++ )

{

nt = ValueWhen(Eq[i], dt);

_TRACE( "i: " + i + " Date: " + NumToStr( nt[i], formatDateTime ) + " Eq: " + Eq[i] );

 

----- Original Message -----

From: ta

Sent: Sunday, February 21, 2010 4:16 PM

Subject: RE: [amibroker] Associating the correct date with barindex

 

 

Thanks for your reply . It does not seem to work for me. The following is the code:

dt = DateTime();
SetForeign( "~~~Equity" );
TimeFrameSet( inMonthly );
Eq = Close;

for ( i = 0 ; i < BarCount ; i++ )
{
   nt =
ValueWhen(Eq[i], dt[i]);
    
_TRACE( "i: " + i + " Date: " + NumToStr( nt[i], formatDateTime ) + " Eq: " + Eq[i] );
}

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Anthony Faragasso
Sent: Sunday, February 21, 2010 6:04 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Associating the correct date with barindex

 

Something like:

Valuewhen(eg[i],dt);

----- Original Message -----

From: ta

Sent: Saturday, February 20, 2010 7:13 PM

Subject: [amibroker] Associating the correct date with barindex

 

Can somebody please tell me how I can associate the correct date with barindex when data is compressed? In the following example I am compressing the closing price of equity curve to monthly. However the trace statement shows incorrect date for the monthly prices.TIA

dt = DateTime();
SetForeign( "~~~Equity" );
TimeFrameSet( inMonthly );
Eq = Close;

for ( i = 0 ; i < BarCount ; i++ )
{
    _TRACE( "i: " + i + " Date: " + NumToStr( dt[i], formatDateTime ) + " Eq: " + Eq[i] );
}

i: 2182 Date: 9/8/2009 Eq: {EMPTY}          

i: 2183 Date: 9/9/2009 Eq: 196780             

i: 2184 Date: 9/10/2009 Eq: 200143           

i: 2185 Date: 9/11/2009 Eq: 199723           

i: 2186 Date: 9/14/2009 Eq: 200235           

i: 2187 Date: 9/15/2009 Eq: 203289           

i: 2188 Date: 9/16/2009 Eq: 203369           

i: 2189 Date: 9/17/2009 Eq: 208362           

i: 2190 Date: 9/18/2009 Eq: 209573           

i: 2191 Date: 9/21/2009 Eq: 211509           

i: 2192 Date: 9/22/2009 Eq: 213253           

i: 2193 Date: 9/23/2009 Eq: 216647           

i: 2194 Date: 9/24/2009 Eq: 219080           

i: 2195 Date: 9/25/2009 Eq: 230729           

i: 2196 Date: 9/28/2009 Eq: 231932           

i: 2197 Date: 9/29/2009 Eq: 234587           



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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





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

__,_._,___