Note: I want to do this in MQL 4. But I'm getting lost on every single example I look at.
All I've got is a starting point.
To learn, I just want to copy the EURSD data in MqlRates to eurusd (yes different caps for different variables). I don't care the time frame because I'm not doing a time frame conversion. 1 hour to 1 hour is fine. Like I said, I'm trying to learn how to do it.
This is all I have:
All I've got is a starting point.
To learn, I just want to copy the EURSD data in MqlRates to eurusd (yes different caps for different variables). I don't care the time frame because I'm not doing a time frame conversion. 1 hour to 1 hour is fine. Like I said, I'm trying to learn how to do it.
This is all I have:
Inserted Code
//+------------------------------------------------------------------+ //| Offline Chart.mq4 | //| Copyright 2021, Nondisclosure007 | //| https://no.link.yet | //+------------------------------------------------------------------+ #property copyright "Copyright 2021, Nondisclosure007" #property link "https://no.link.yet" #property version "1.00" #property strict //--- input parameters #include <Files\FileBin.mqh> #include <WinUser32.mqh> #include <stdlib.mqh> #import "user32.dll" int RegisterWindowMessageW(string lpString); #import CFileBin oFile; input int inpCustomTimeFrame=3; string filename = NULL; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- filename = Symbol() + IntegerToString(inpCustomTimeFrame) + ".hst"; oFile.Open(filename,FILE_BIN | FILE_WRITE | FILE_ANSI); HstHandle = FileOpenHistory(sSymbolName + IntegerToString(RenkoTimeFrame) + ".hst", FILE_BIN | FILE_WRITE | FILE_ANSI); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- MqlRates EURUSD, eurusd; } //+------------------------------------------------------------------+