Thanks for your quick reply Hanover, this definitely answers my question and solves my problem. I owe you one, let me know if you need any help in excel or VBA.
ZM
MT4 to Excel through Excel RTD (Finally!) 609 replies
MT4 export to Excel? 8 replies
How do you Export MT4 price to Excel? 7 replies
Export to Excel 6 replies
Export OHLC to Excel 4 replies
DislikedHi Hanover, I'm using your "out_hist" indicator to extract certain indicator values to excel. I managed to add most of the things I want however got stuck with Moving Average of an Indicator. I figured out I need to use iMAOnArray but don't have enough programming knowledge to create the array or where to place it exactly. I think it should be something like; iMAOnArray(MOMENTUM_25,ccy,tf,12,0,MODE_SMA,i) But as I mentioned I fail to create MOMENTUM_25. Can you please help me to add 12 periods Simple Moving Average of 25 periods Momentum? This...Ignored
DislikedOf course it is easy in excel but when you are looking at a long history (I usually go back 2000 periods) for multiple pairs (usually 6-8 pairs) and multiple time frames (monthly, weekly, daily, hourly, 10 minutes), calculating indicators in excel is slower compared to directly extracting indicator values from metatrader. Instead of using excel formulas and VBA, I created a new excel file today which reads the values direcly from "out_hist" indicator's output and was able to reach the same excel output in a minute compared to 10 minutes. Moreover,...Ignored
double iMAOnArray(double array[], int total, int period, int ma_shift, int ma_method, int shift)
double macurrent=iMAOnArray(ExtBuffer,0,5,0,MODE_LWMA,0); double macurrentslow=iMAOnArray(ExtBuffer,0,10,0,MODE_LWMA,0); double maprev=iMAOnArray(ExtBuffer,0,5,0,MODE_LWMA,1); double maprevslow=iMAOnArray(ExtBuffer,0,10,0,MODE_LWMA,1); //---- if(maprev<maprevslow && macurrent>=macurrentslow) Alert("crossing up");
DislikedHi, Hanover, Indicator is perfect, congratulation for ur great work, but when using XAUUSD it shows only XAUUSD,M1,2013-11-29,20:30,250.91500,251.46500,250.86000,251.46500,17 it must be 1,250.91500 how can i correct this? Thx. {quote}Ignored
Disliked{quote} Did you try changing the PriceFormat setting from T3.5 to T6.5? That will increase the number of places to the left of the decimal point, of the price values being output, from 3 to 6. The original settings were designed for currencies, not metals.Ignored
DislikedHello everyone, I have written the enclosed piece of code to make the MT4 export the desired FX Data to the specified csv file. It works fine, it does it every five minutes, but there's a small snag (which makes me feel as if I had a tiny rock in my sock :-)). I can't find the reason why it just doesn't export the data upon the very opening of the MT4 software. I mean I don't know where, but there's got to be a bug somewhere in my code, as the export doesn't get executed when the MT4 gets started, which is very strange. The export happens and is...Ignored
DislikedThank you very much for the quick response. I like the corrections you've made. Unfortunately, in spite of your improvements, it keeps behaving the same. When MT4 is being opened, it displays the comment line ("Starting data export to " + OutputFile) for several seconds, and then it displays the next comment line ("Unable to open output file"). And, what is interesting, if - during that process - I try to open the output csv file (in Excel), I get a message that the file is in use, that it is blocked by 'another user' and that all I can do is open...Ignored
DislikedThat's right. The init() part covers here: the indicator buffers, index buffers, and the pair names' assignment to the corresponding strings. Is there still missing something? Well, I don't know, but I don't think so, because I've seen many exporting indicators with a very scant init() section. I also suppose that deinit() should also be ignored (although I'm not 100% sure). Thanks for your effort and your helpful approach, anyway. My last question would be: which part of that code invokes your greatest suspicion, because I will keep searching...Ignored
DislikedI'm sorry, but after the changes described above the indicator works at the start of MT4, but it no longer refreshes the exported file. The reason, I suppose, is the code in point 4) should initiate that refresh process at the completion of the tfr bar and here it does nothing - no call to the Export() function, as there is no Export() function after I removed the void block. After many experiments with this code I have noticed that just doing without the 'void' structure and leaving that code in start() makes it start at the software opening and...Ignored