Boxes EA
-
How can I do to create an EA, in which:
1.- Draw a box, and let me optimize the number of minimum periods (Candlesticks) so that the box is formed.
2.- The range (height in pips of the box), this is other parametres to optimize.
3.- Operate the rupture of the box.
The order entry when the limit up or low is break + some pips that I must optimize.
I Saw this, but I don´t understand it.: https://fxdreema.com/shared/Fdu0dU2Hd
Can help me sombody, please?
-

this is the estrategy, but I can not to programme this in fxdreema
-
In this example I see Rectangle, which is placed at the chart. On the chart we don't work with pixels, we work with Time and Price values. Those objects that can be put at certain pixels from the top, they are placed over the chart and they appear static (they don't move when you move the candles).
Otherwise all "Draw..." blocks are basically the native ObjectCreate() functions + all the possible parameters for the particular object. So in "Draw Rectangle" you specify all the parameters to draw a rectangle object. Such object has 2 Time and 2 Price coordinates, because it is made out of 2 points on the chart (Time1, Price1 and Time2, Price2).
-
@alvarez Do you actually need rectangles?
Actually I can't help with finding those 3 levels on the top and 3 levels on the bottom. This requires some algorithm and this is normally found in custom indicators, they are made for this.
But you can find the maximum/minimum value in certain amount of candles or period of time. This is not exactly the same, but it is easier. http://prntscr.com/gx1f71
-
check here, you might find the example given there useful at least to some extent. https://fxdreema.com/forum/topic/5108/boxes/11
-
Thak you fxDreema, the rectangle only must have 2 level on the top and 2 level on the bottom (no is necesary 3 levels). I tried with https://prnt.sc/gx1f71, but you said, no is the same.
thank you Adnermaiden2nd, I see the example, but I need 2 level on the top and 2 level on the bottom minimum. I see the post taht you recomended me, but when dont paint in the mt4 when y copy and paste in a EA.
-
@alvarez you can draw two blocks to have double top and double bottom. Remember though to remake by hand the constants as they do not translate well in the shared example. The details of said constants are on the topic.
-
Find an indicator that does what you are looking to do and use that instead