//--- CChartObject::Save の例
#include <ChartObjects\ChartObject.mqh>
//---
void OnStart()
{
int file_handle;
CChartObject object=new CChartObject;
//--- オブジェクトパラメータを設定する
//--- . にて。にて。
//--- ファイルを開ける
file_handle=FileOpen("MyFile.bin",FILE_WRITE|FILE_BIN|FILE_ANSI);
if(file_handle>=0)
{
if(!object.Save(file_handle))
{
//--- ファイル保存エラー
printf("File save: Error %d!",GetLastError());
FileClose(file_handle);
//---
return;
}
FileClose(file_handle);
}
}
|