PureBytes Links
Trading Reference Links
|
Paul,
I should mention that the proper Metastock format is below, your column
headings are incorrect:
The correct format for a Metastock data file is as follows:
<TICKER> <PER> <DTYYMMDD> <TIME> <OPEN> <HIGH> <LOW> <CLOSE> <OPENINT>
Ticker may be any name you wish.
PER - means periodicity, for daily use D, for intraday, use I.
DTYYMMDD may be 10/31/2005
time is like this: 93500 would be 9:35 am
OPEN, HIGH, LOW, CLOSE is whatever price
OPENINT is the open interest field, you may leave blank
Try this,
Marc
----- Original Message -----
From: "Paul" <rivatrading@xxxxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Sunday, October 30, 2005 6:12 PM
Subject: File Append function issues
> Hi All,
>
> I am trying to figure out the file append function.
>
> I am trying to create a metastock ascii file with the following format
> <date>, <time>, <open>, <high>, <low>, <close>, <volume>
> <yyyymmdd>, <HH:MM>, <open>, <high>, <low>, <close>, <upticks + downticks>
>
> and I want it to export to the "C:\TSdata\" directory
>
> and I want the file name to be
> <symbol>_lastbaronchartDATE_lastbaronchartTME.csv
>
> I have included what I have done below but it does not verify. Would
> someone mind having a look at the code and see where I maybe going wrong.
>
> Thanks
> Paul
>
> { <><><> START CODE <><><>}
> Inputs: DIR("c:\TSdata\"), Decimalz(2);
>
> Vars: Name(String);
>
> If LastBaronChart then Name = (Symbol + NumToStr(1900+year(date),0) +
> NumToStr(month(date),0) +
> NumToStr(FracPortion(date/100)*100,0) + "_" +
>
> NumToStr(IntPortion(TIME/100),0) +
> NumToStr(FracPortion(TIME/100)*100,0));
>
>
> If currentbar >= 1 then FileAppend(DIR+name +".csv",
> NumToStr(1900+year(date),0) +
> NumToStr(month(date),0) +
> NumToStr(FracPortion(date/100)*100,0) + "," +
>
> NumToStr(IntPortion(TIME/100),0) + ":" +
> NumToStr(FracPortion(TIME/100)*100,0) + "," +
>
> NumToStr(Open,Decimalz) + "," +
> NumToStr(High,Decimalz) + "," +
> NumToStr(Low,Decimalz) + "," +
> NumToStr(Close,Decimalz) + "," +
> NumToStr(Upticks + Downticks,0) + "," + newline );
>
> if c<> c then plot1(1," ");
>
> {<><><> END CODE <><><>}
>
>
|