| New signals service! | |
|
|||||||
| 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 |
|
||||
|
Found Work-Around
Well, I found my own work-around to the problem
(The problem was that data in an indicator/expert was only being saved by MT4 at the end of a min bar, and even though i set a value to a variable, it would revert to the previous bar's value for that variable if i get multiple ticks in the same 1 min bar) I wrote a library file with 2 functions. SaveData and ReadData and I made a local global array in the library for saving the data. In my main Indicator or Expert program, if i need to save and read data on tick by tick basis (within a 1 min bar), i save the data to SaveData(ptr, value) (ptr is the index to the data array in the library function), then to get the data, i call ReadData(ptr). The data in the library does not revert back to the previous bar's data while gettng multiple ticks in one bar. I have attached both a new TickData test file and the library function (Libraries go in the /library sub dir) |
|
||||
|
Quote:
PHP Code:
06:33:14 Tick Data USDCHF,M1: 2006.07.04 06:33 NoChange Close=1.2235 lastClose=1.2235 06:34:25 Tick Data USDCHF,M1: 2006.07.04 06:34 Dn Close=1.2234 lastClose=1.2235 06:34:28 Tick Data USDCHF,M1: 2006.07.04 06:34 Up Close=1.2235 lastClose=1.2234 06:34:29 Tick Data USDCHF,M1: 2006.07.04 06:34 Dn Close=1.2234 lastClose=1.2235 06:34:31 Tick Data USDCHF,M1: 2006.07.04 06:34 Up Close=1.2235 lastClose=1.2234 06:34:32 Tick Data USDCHF,M1: 2006.07.04 06:34 Dn Close=1.2234 lastClose=1.2235 06:34:59 Tick Data USDCHF,M1: 2006.07.04 06:34 Up Close=1.2235 lastClose=1.2234 06:36:20 Tick Data USDCHF,M1: 2006.07.04 06:36 Up Close=1.2237 lastClose=1.2235 06:36:20 Tick Data USDCHF,M1: 2006.07.04 06:36 Dn Close=1.2235 lastClose=1.2237 06:36:20 Tick Data USDCHF,M1: 2006.07.04 06:36 Up Close=1.2236 lastClose=1.2235 |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tick Indicator | Alex.Piech.FinGeR | Metatrader 4 | 95 | 08-30-2008 08:27 PM |
| What's the best way to check if the tick is the first tick of the new bar? | blooms | Metatrader 4 | 2 | 10-31-2006 06:10 AM |
| Using tick data? 100% MQ? | Willis11of12 | Metatrader 4 | 5 | 03-28-2006 03:20 PM |