Forum

Strategy Tester Spread Bug

Can anyone else confirm this annoying bug ? Open Strategy tester . Set the spread to 3. Slide the strategy tester window's top bar all the way down so you can see the whole chart. Slide the strategy tester window's bar back up what does the spread box say say now

Where are the indicator/script/experts templates ?

In the old versions I believe they were in the templates folder I cant find them in the new version, I want to modify my indicator template because it doesn't have the DeInit function already in it

ArraySetAsSeries

I know I have asked about this before on the mql4 forum but never got to the bottom of it. From the documentatin: Arrays of price data passed as input parameters into the OnCalculate() function do not obligatorily have the indexing direction the same as in timeseries. The necessary indexing

ArraySetAsSeries()

Looking at the code for included indicators I noticed MQ now does this in most if not all of them: example from Heiken Ashi //--- counting from 0 to rates_total ArraySetAsSeries (ExtLowHighBuffer, false ); ArraySetAsSeries (ExtHighLowBuffer, false ); ArraySetAsSeries (ExtOpenBuffer, false );

OnCalculate() Copying from the rates arrays

I need to copy the last ten highs from the high[] array in OnCalculate() int Length = 10 ; double ahigh[]; ArrayResize (ahigh,Length); ArrayCopy (ahigh,high, 0 , 0 ,Length); for ( int i= 0 ; i<Length; i++) { Print ( "high[" ,i, "] = " ,high[i], " ahigh[" ,i, "] = " ,ahigh[i]); }

TimeToStr()

I wrote this simple EA for someone else the other day, all it does is check each of the 4 timeframes for a new bar, if there is one it looks for if the last closed bar volume is lower than the previous 2 on any of the 4 timeframes and Alert() if it is. void OnTick () { //--- const int ichart[ 4

Local Arrays are no longer Static ?

I don't remember reading anything about the properties of arrays being changed, are they supposed to still be static by default ? In strategy tester 616 they are not unless I explicitly define them as static. I'll post a test code in a few minutes in case anyone wants to check this out

Local Arrays. ME keeps warning me: "possible use of uninitialized variable"

Is it no longer acceptable to assume arrays are initialized to zero when they are declared ? If so what is the proper method ? Using ArrayInitialize() locally will cause array to be reset on every tick there doesnt seem to be a sensible alternative ? Always declare them globaly and use OnInit()

skipping parameters in afunction call

Anyone know how to create functions where you can skip parameters in the call, that dont need to be changed, something like: myfunction(1,2,,,5) //asuming the skipped function parameters are already intitialized ... void myfucntion( int param1= 1 , int param2= 2 , int param3= 3 , int param4= 4 , int

How to pass ENUMs as variable function parameters

example function to initialize buffers So I might want to pass ENUM_INDEXBUFFER_TYPE as INDICATOR_DATA, or as INDICATOR_CALCULATIONS but I cant use it like a variable data type, is there another way of doing this or do I need to learn something in mql5 ? void initbuffer( double &array[]