Setting Automatically SL on Horizontal line
-
Hello Dreema
I would like to know how to set automatically a stop loss at the moment of opening the trade on a horizontal line, in this way it would be possible to let the EA automatically calculate the risk % and the lot.
I've tried both pick by name and picked in loop, the EA just doesn't trade.Picked in loop for me is not ideal, because in the loop there is already another object. Here are my failed attempts.
https://fxdreema.com/shared/UajMH4zDd
Thank you

-
You have selected Object Description, which is something totally different. Try this: http://prntscr.com/61aru6
-
I've tried with Attributes (numeric). I sadly can't get it to work.
Here are the examples. Anyway I strongly prefer to learn how to use pick by name. -
The project looks fine to me, but there is something missing in Condition blocks. I have no explanation how some Variable is used there, but it does not exists... maybe you have copied these blocks from other project, which is problematic. I think this is the problem now.
Objects does not have special ID numbers, their IDs are their names, that's why objects are selected by name. Picked by name = when you know the name of the object. Picked in loop = when you don't know it, but you search for objects using "For each Object", which actually selects the object.
-
I got it working

The problem was that in the optimisation it automatically put another name for the object.
Thank you very much!
-
I thought that objects does not work at all in Optimization mode

http://docs.mql4.com/runtime/testing
http://i.imgur.com/HBbazDO.png -
I don't know, I called optimisation that screen that appears when you open the EA.
Anyway I made a new very simple indicator that draws rectangles on support and resistance but it opens a window under the chart that is not needed.
How not to open this window? -
You are asking me about real indicator? There is some property on the top of the code that is responsible for that.
-
I compiled an EA with fxdreema that just draws and if I put it in the indicators folder and run it as an indicator it kinda works XD. But it opens such window
I have also another curiosity, downloading EAs on the internet they often have a funcion in the optimisation True/False. This blocks a group of funcions, can I do that on an EA on fxdreema?
-
I really don't know what you are talking about, so here is some very useful program that easily makes screenshots, and I use it every day, not only for fxDreema: https://app.prntscr.com/en/index.html
-
here it is, I made a project with fxdreema, took the mq4 and put it in the indicators folder.
The project is "Res supp"
When i open it it kinda works fine, I will have to perfection it. But as you can see in the picture, there is a second window at the bottom of the chart that is the RSI, Stochastic indicator kind of window.
I don't want it to appear, I don't need it in the indicator. -
here it is.
I made an mq4 file with fxdreema and put it in the indicator folder.
It works but it opens a window under the chart, as it is for RSI or Stochastic indicators.
I just would like to not open this window, it is enough that the indicator draws on the chart. -
You don't need those "Pass" blocks, none of them. And most probably you don't also need "Once per seconds" when you are under "on Timer"
I don't know why you have this additional window, I have never seen such a problem before. Windows like this appear because of indicators, but you don't even have indicators in this EA. Maybe it's some bug. What is your MT version? I don't have the same problem by the way, here is how it looks for me: http://i.imgur.com/QAhaoj1.png
-
I load it as an indicator not as an EA. I use that file and put it in the indicator folder
-
Well, fxDreema does not generate indicators, it generates only EAs and Scripts.
-
Ok, thank you for your help, I just thought that it was possible. Considering that it worked except for that.
Fxdreema is such an amazing project that I naturally overestimate it XD