//+------------------------------------------------------------------+
//| PriceScript.mq4 |
//| Copyright 2015, AM2 |
//| http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, AM2"
#property link "http://www.forexsystems.biz"
#property version "1.00"
#property strict
input int bars = 200;
input int hstart = 10;
input int hend = 12;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void SaveToFile(double OpenPrice,double ClosePrice)
{
int h=FileOpen("price.csv",FILE_WRITE|FILE_READ,";");
if(h!=-1)
{
FileSeek(h,0,SEEK_END);
FileWrite(h,OpenPrice,ClosePrice);
FileClose(h);
}
}
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
for(int i=bars;i>0;i--)
{
if(TimeHour(Time[i])>=hstart && TimeHour(Time[i])<=hend) SaveToFile(Open[i],Close[i]);
}
}
//+------------------------------------------------------------------+
1.15674;1.15278
1.15273;1.15549
1.15554;1.15373
1.14964;1.15124
1.15129;1.14729
1.14728;1.14554
1.13291;1.1308
1.13082;1.12822
1.12824;1.12897
1.12634;1.12963
1.12964;1.12879
1.12878;1.12843
1.12233;1.12159
1.12158;1.12
1.12004;1.12035
1.12828;1.13194
1.13194;1.12746
1.12746;1.12575
1.12801;1.12578
1.12578;1.12798
1.12799;1.12634
1.12197;1.12342
1.12343;1.12398
1.12399;1.12301
1.11306;1.11439
1.11438;1.11398
1.11399;1.11403
//+------------------------------------------------------------------+
//| PriceScript.mq4 |
//| Copyright 2015, AM2 |
//| http://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2015, AM2"
#property link "http://www.forexsystems.biz"
#property version "1.00"
#property strict
input int bars = 20;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
void SaveToFile(double OpenPrice,double ClosePrice)
{
int h=FileOpen("price.csv",FILE_WRITE|FILE_READ,";");
if(h!=-1)
{
FileSeek(h,0,SEEK_END);
FileWrite(h,OpenPrice,ClosePrice);
FileClose(h);
}
}
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
for(int i=bars;i>0;i--)
{
SaveToFile(Open[i],Close[i]);
}
}
//+------------------------------------------------------------------+
1.11281;1.10951
1.10946;1.11016
1.11016;1.11163
1.11161;1.11314
1.11314;1.1115
1.11151;1.1124
1.1124;1.11223
1.11207;1.11188
1.11188;1.11197
1.11194;1.11233
1.11233;1.11273
1.11273;1.11252
1.11251;1.11246
1.11246;1.11231
1.11232;1.11301
1.11302;1.11356
1.11355;1.11304
1.11306;1.11439
1.11438;1.11398
1.11399;1.11403
AM2