Login Page - Create Account

Support Board


Date/Time: Mon, 06 Jan 2025 09:48:10 +0000



Post From: Adapt WriteBarDataToFile with sc.BidSize sc.AskSize

[2014-06-27 17:36:25]
Leo33 - Posts: 73
In the Studies6.cpp

/***********************************************************************/
SCSFExport scsf_WriteBarDataToFile(SCStudyInterfaceRef sc)
{
...
..
BarDataString.Format(formatString,
      DateString.GetChars(),
      hour,
      minute,
      second,
      MillisecondsText,
      sc.FormatGraphValue(OpenValue, ValueFormat).GetChars(),
      sc.FormatGraphValue(HighValue, ValueFormat).GetChars(),
      sc.FormatGraphValue(LowValue, ValueFormat).GetChars(),
      sc.FormatGraphValue(CloseValue, ValueFormat).GetChars(),
      sc.Volume[Index],
      sc.NumberOfTrades[Index],
      sc.BidVolume[Index],
      sc.AskVolume[Index]);

    WriteFile(hFile,BarDataString.GetChars(),(DWORD)BarDataString.GetLength(),&numOfWrittenByte,NULL);

..
..
>>>>

>>>might i be able to add in:
sc.BidSize
sc.AskSize

>>>and change the file headers to include them?
fileHeader = "Date Time Open High Low Close Volume NumberOfTrades BidVolume AskVolume\r\n";
to::
fileHeader = "Date Time Open High Low Close Volume NumberOfTrades BidVolume AskVolume BidSize AskSize\r\n";

I don't suppose it could be that straightforward?