|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Help: Simple Save Data To A File
I'm tinkering around trying to figure out how to send 15 minute data to a file. Any help would be appreciated.
It compiles without errors. I put it in the Indicator folder and it's visible, but when I try to add it in MT4, it's not accepted - does not get added to the EURUSD chart. int start() { int handle; string tSymbol="EURUSD"; double rates_m15[][6]; ArrayCopyRates(rates_m15,tSymbol,PERIOD_M15); handle=FileOpen("Out.csv",FILE_CSV|FILE_WRITE,',') ; if (handle<1) { Print("File Out.CSV not found, the last error is ", GetLastError()); return(false); } else { FileWrite(handle,tSymbol,TimeToStr(rates_m15[0][0]),rates_m15[0][1],rates_m15[0][2],rates_m15[0][3],rates_m15[0,4]); FileClose(handle); Alert("Sent Data File"); } } |
|
||||
|
Hi, sorry for asking this, maybe I'm just not quite understand the problem. But why need additional script to write to CVS file when we already have SAVE AS feature from MT4 ? Thank you in advance
![]()
__________________
David Michael H "Trader helps traders with sincerity, honesty and integrity" |
|
||||
|
Quote:
|
|
||||
|
Quote:
![]()
__________________
David Michael H "Trader helps traders with sincerity, honesty and integrity" |
|
|||
|
Did it
This did the trick. Thanks a lot.
I'm a better VB6 than 'C' programmer, so while I'm re-going through the learning curve (haven't programmed in 'C' since the mid-80s when I worked on Unix), I'm interacting between MT4 & VB6. I'm programming in the MMTS system from the e-Book - which I can do easily in VB6 with the interaction from MT4. I can also use a number of visual metaphors such as scoring the 19 different setups identified by Monika. I know that I can use the DDE connection between MT4 & VB6, but this lets me leverage the MT4 system. Thanks again. |
|
|||
|
Figured out problem
With the help of the other posts, I figured out the problem. I'm sure anyone looking at it knew and were just letting me struggle so I'd learn from it :-)
1) I didn't understand the difference between a script and an indicator. That's why MT4 wouldn't accept it. 2) I left out the "return(0)" at the end of the start() section. MarkC. |
|
|||
|
write historical indicator values to a csv?
I am plotting objects at various times on a chart and would like to know how to get various indicator values for the points in time where the objects are plotted. Similar to the data window feature in MT4.
Example - if I create an arrow object on a chart as follows: ObjectCreate("buy_arrow", OBJ_ARROW, 0, D'2008.06.30 3:30', 1.5785) How can I get rsi value for the exact point where that object lives on the chart? Thanks, Ken |
|
|||
|
iExposure - indicator - excel....
Hello.
I have one question. How to get data from indicator iEXposure to excel....How can it I transfer direct to the excel tabele... I now to used the current data in excel (like: =MT4|BID!EURUSDm....) I need, that i can transfer data from deals, buy, sell and so one.... Please, could me someone help by this problem? Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can an EA save to and read from a preset file? | ZTrader | Questions | 0 | 03-05-2007 09:35 PM |
| How to save to *.TXT file | thanhhaf2003 | Metatrader 4 mql 4 - Development course | 1 | 02-11-2007 07:41 PM |
| What is .set file? | maniek | Questions | 0 | 03-31-2006 08:20 PM |
| Mt3 EXP file | forexpipmaster | General Discussion | 7 | 02-03-2006 05:17 PM |