You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I think it is the wrong place to ask question, to justify what right and wrong is user (me).
I agree with you RaptorUK - another interprtation would be that they wish to save each new 15M Bar info to a CSV. I have code that will saves all the bar info that interests me and then quits the chart - its an easy write but doubt it will help the User
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
int handle ;
double count=0 ;
handle=FileOpen(ToFileName,FILE_CSV|FILE_WRITE,",");
int LineCount = 0 ;
if ( handle>0 )
{
FileWrite(handle, "Date","Time","OPEN","HIGH","LOW","CLOSE",Bars);
for(int i=0;i<Bars;i++)
{
FileWrite(handle, Date2String(Time[i]),Date2Time(Time[i]),Open[i],High[i], Low[i],Close[i]);
count=count+1 // Do I need this? For loop uses "i" for counting
}//for
}//if
FileClose(handle);
Alert("FileWrite Done") ;
//----
return(0);
}
string Date2String( datetime MyTime)
{
int TheDay = TimeDay( MyTime ) ;
int TheMonth = TimeMonth( MyTime ) ;
int TheYear = TimeYear( MyTime ) ;
return( TheDay+"/"+TheMonth+"/"+TheYear ) ;
}
///////////////
string Date2Time( datetime MyTime)
{
int TheHour = TimeHour( MyTime ) ;
int TheMinute = TimeMinute( MyTime ) ;
int TheSeconds = TimeSeconds( MyTime ) ;
return( TheHour+":"+TheMinute+":"+TheSeconds ) ;
}
I show my requirement from above coding. I open 4 charts at the same time, and "AUDUSD,M30" is the chart I want to save data in csv format on every 15 minutes, and MT4 may not focus in the front application, because I may work with another application at the same time, but get no idea on set to run it every 15 minutes automatically.
Does anyone have any suggestions?
Thanks everyone very much for any suggestions
Does anyone have any suggestions?
I have already given a suggestion that will work . . . did you try it ?
I want to save data in csv format on every 15 minutes, and MT4 may not focus in the front application, because I may work with another application at the same time.
But your suggestions require that MT4 keep focus . . . otherwise the the commands will go to the wrong application, on the other hands, can you show your suggestions in coding please?
Thanks everyone very much for any suggestions
can you show your suggestions in coding please?
No. DIY.
So what is your intention on replying this post? Looking for business ?
So what is your intention on replying this post? Looking for business ?