MQL4 - automated forex trading   /  

Forum

Beta Testing of MetaTrader 5 Has Started!

Back to topics list  | << < 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 > >> To post a new topic, please log in or register

avatar
96
circlesquares 2009.10.23 03:28 
circlesquares wrote >>

Not sure if I found a bug or if its by design, but after a minute of local time, the bar data from a tf that is not loaded on a chart seems to be cleared.

so if i'm on H4 and I call on my new iHigh function like:


Print(iHigh(NULL,PERIOD_H3,11));//we are asking for the high of the 12th bar on H3


that will on first call fail. but then if I call it again in under a minute, it will work. If we wait a minute further, it will fail. So their seems to be some clearing of the bar data on a consistent basis, and it doesn't get recreated until we force it by calling on it. problem is, it isn't recreating the data until AFTER my function is returned. Hope that explains it clearly.


So is this a bug or is their a workaround that we should be using?



I found the workaround to this(it involves looking at SeriesInfoInteger(symbol,tf,BARS_SYNCRONIZED) in a loop with a Sleep until it returns true) and also made major changes to the timeseries and made it much much faster. Will post later.


avatar
63
phampton 2009.10.23 10:19 
Does anyone have a feeling for what area of code creates a "code generate error" in the compiler? I've written an include which compiles fine with a simple test EA, but won't compile when added to something more complex.

avatar
Moderator
5089
stringo 2009.10.23 12:38 
nondisclosure wrote >>

Has anyone found any documetation anywhere on how to utilize the mql5.dll file?

The same as in the mql4. Just do it


avatar
4
wvs 2009.10.23 19:49 
fai wrote >>

This is my MQL4 to MQL5 porting table .

Maybe useful for someone.

# ver.0.2

# Fixed a spelling error.

# Added extern,iMA,iMAOnArray.

Hello Fai:


I found your porting table very helpful in finding the Ask- and Buy Prices.


However I have trouble in getting the High[]-, Open[]-, Low[]- and Close[]-Prices...


Can you write an example as to how to get them, please???


I thank you in advance!




avatar
72
fxt 2009.10.23 20:17 




avatar
3
mirgiyos 2009.10.23 21:07 
Not to upset you guys, but to be honest I expected more.........I don't see any principal changes in MT5 exept additional periods.........however even here it would be much more useful if the users could operate with any periods....as it is already realized in Tradestation or e-signal.........also tick and second charts would have been much appreciated..........moreover.....the market watch window has essentially remained the same......you could have add some additional feathers such as sorting by %range/change, filtering and e.t.c......and where is that damn quotes archive?????.....

avatar
44
nondisclosure 2009.10.23 21:21 
stringo wrote >>

The same as in the mql4. Just do it

There is no mql4.dll. What are the specific calls to the mql5.dll?

I know how to call the dll calls in mq4, but I don't know what is in the mql5.dll


avatar
96
circlesquares 2009.10.23 22:54 
wvs wrote >>

Hello Fai:


I found your porting table very helpful in finding the Ask- and Buy Prices.


However I have trouble in getting the High[]-, Open[]-, Low[]- and Close[]-Prices...


Can you write an example as to how to get them, please???


I thank you in advance!



Those are available if you are writing an indicator. This is from the reference:

int OnCalculate (const int rates_total, // Size of input taymsery

const int prev_calculated, // Handle bars on a previous call

const datetime& time[], // Time

const double& open[], // Open

const double& high[], // High

const double& low[], // Low

const double& close[], // Close

const long& tick_volume[], // Tick Volume

const long& volume[], // Real Volume

const int& spread[] // Spread

);

Options open [], high [], low [] and close [] array contains the prices of opening, maximum, minimum prices and closing prices of the current timeframe.Setting time [] contains an array with the values of the time of opening, the parameter spread [] - array containing the story spreads (if the spread is provided for the trading instrument).Options volume [] and tick_volume [] contain the history of trade and the volume of teak.

To determine the direction of indexing of arrays time [], open [], high [], low [], close [], tick_volume [], volume [] and spread [], must call the functionArrayGetAsSeries(). In order not to depend on the default, you must surely call the functionArraySetAsSeries()for those arrays, which is expected to work.

-------------------


Thats all good if your building an indicator, but if you need it in a script or EA, you need to build your own arrays and keep them updated on every tick, or use the mt4timeseries functions I made available on previous pages.



avatar
24
bcsunwww 2009.10.24 09:37 
What's the mean of "taymsery" or "taymseriey" in help file,Please?

avatar
59
fai 2009.10.24 10:17 
bcsunwww wrote >>
What's the mean of "taymsery" or "taymseriey" in help file,Please?

It's "time-series".

If you have my google translated help file, please install again from http://files.metaquotes.net/metaquotes/mt5/mt5setup.exe

New help file is in English.

Back to topics list   | << < 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 > >>  

To add comments, please log in or register