slavename / Publications
Forum
"Incorrect start position 0..." error
When backtesting my EA I am getting the error "incorrect start position 0 for arraysort function ", but there's no info on that error. When I do GetLastError() I get error 4051 but I don't think it's related (I had that as my last error, but fixed it so think it's residual), but then again, I dont
For statement won't return correct value
I'm having an issue with a for statement, constantly returning 0, even though it shouldn't (by my expectation). Any help would be appreciated. I can post entire code if it's not enough to assume everything is correct except something here (for statement checks a variable (min) versus an array's
Constants required in array
Trying to make an array of 4 EMAs, but getting error that the defined values of the array must be constants. Is there a workaround? double h4Long = iMA ( NULL , PERIOD_H4 , 365 , 0 , MODE_EMA , PRICE_CLOSE , 1 ); double d1Long = iMA ( NULL , PERIOD_D1 , 365 , 0 , MODE_EMA , PRICE_CLOSE , 1 );
ChartRedraw(0) and WindowRedraw() failures
I have read and tried every forum post about refreshing/updating charts on new bar. I can't get any of them to work, even those that seem to be working for others. For example the following two versions of the same one, both placed within start(). What am I doing wrong?! Edit: I also tried it
iHigh w/Arrays
Why is this not returning the iHigh values for the previous 10 bars? (It instead returns 10 10-digit numbers, seemingly unrelated to the price, including negative numbers): void start() { int bars = 10 ; if (bars >= Bars ) bars = Bars - 1 ; double highs[]; ArrayResize
ObjectCreate not drawing
Learning MQL4 and trying to make a simple EMA calculator that will place a line on the chart (using OBJ_HLINE since I don't know how to do a continuous line like in the default indicator). Everything seems fine, but I can't get the line to draw. I've been through so many sets of code, trying to