Forum

ObjectCreate: Trying to draw a trend line with OBJ_TREND in MT4 between Highs - getting error in code

Hi, I am getting this error: '[' -array required I am using ObjectCreate - the documentation is not very clear about the types of params I should be passing. Here is the code: int i = 5 ; // the following line is throwing the error: ObjectCreate ( 0 , "tr" + string (i), OBJ_TREND , 0 ,Time[ 1

I want to draw rectangles on top of wicks - trying to use OBJ_RECTANGLE

Hi, I want to superimpose a rectangle on top of wicks. I'm trying to use ObjectCreate (OBJ_RECTANGLE). But the rectangle that gets drawn is not 'ON' the wick - its to the left (or right). I am using Time[0] and Time[1] to give the x coordinates of the rectangle. And the prices for the y coords. The

When optimizing an EA it gave amazing results, but when backtesting it performed poorly, why?

Hi, I have written an EA which gives me really good results when I optimise it over a six month period - supposedly the best results are like 35-40% profit. However, when I select the 'best' set of parameters (I choose the highest profit), and then run those as a single backtest on the same currency