거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Twitter에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
스크립트

Simplest CSV file writer - MetaTrader 5용 스크립트

조회수:
631
평가:
(1)
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

Use this simplest class to write CSV file with out any preparations and types casting declarations.

Find the shortest usage example below.

  string Filename = "filename_writer.csv";

  CDKSimplestCSVWriter CSVFile; // Create class object

  // Add first row and set values by column name
  CSVFile.AddRow();
  CSVFile.SetLastRowValue("Time", TimeToString(TimeCurrent(), TIME_DATE|TIME_MINUTES));
  CSVFile.SetLastRowValue("Open", DoubleToString(SymbolInfoDouble(Symbol(), SYMBOL_BID), _Digits));
  CSVFile.SetLastRowValue("Close", DoubleToString(SymbolInfoDouble(Symbol(), SYMBOL_ASK), _Digits));

  // Add second row using returned row index and SetValue by name
  uint r = CSVFile.AddRow();
  CSVFile.SetValue(r, "Time", TimeToString(TimeCurrent() + 60, TIME_DATE|TIME_MINUTES));
  CSVFile.SetValue(r, "Open", DoubleToString(SymbolInfoDouble(Symbol(), SYMBOL_BID), _Digits));
  CSVFile.SetValue(r, "Close", DoubleToString(SymbolInfoDouble(Symbol(), SYMBOL_ASK), _Digits));

  // Demonstrate SetValue by column index (index 0..n-1). Here we set first column of first row to a custom value
  if (CSVFile.RowCount() > 0 && CSVFile.ColumnCount() > 0)
    CSVFile.SetValue(0, 0, "CUSTOM_TIME");

  // Write CSV to file. Pass FILE_ANSI to write ANSI encoded file if desired.
  if (CSVFile.WriteCSV(Filename, true, ";", FILE_ANSI)) {
    PrintFormat("Successfully wrote %d rows with %d columns to: %s", 
                CSVFile.RowCount(), CSVFile.ColumnCount(), Filename);
  } else {
    PrintFormat("Error writing CSV file: %s", Filename);
  }

  // Optional: clear memory
  CSVFile.Clear();


Fractal CCI FIlter Fractal CCI FIlter

Fractal with CCI Filter - Indicator that combines traditional fractals with the CCI filter to reduce false signals. Shows red arrows above the candles for bullish fractals (sell) when the CCI is above the configured threshold and green arrows below the candles for bearish fractals (buy) when the CCI is below the negative threshold. Perfect for identifying reversal points with greater reliability.

ZigZag WaveSize ZigZag WaveSize

Modified standard ZigZag indicator with the addition of information about wavelength in pips, levels and different alerts logic

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.