Operations based on the indicator Murrey
-
Hello fxDreema.
I wonder how do I open orders with this indicator in the following image:
http://charts.mql5.com/2/223/eurusd-h1-activtrades-plc.pngHere also attached the indicator.
Basic rules: need you buy when cruising the green line 0/8.
Need you sale when cross the line roza 8/8.Case you need change after the lines, need to know how do.
outputs:
SL to buy on line potilhada below the green line 0/8
SL to sell on the dotted line above the pink line 8/8......
M-Math v4.mq4 -
This indicator has no buffers, but at least it's lines have simple names - from mml0 to mml10. So I can suggest what is in "Condition" -> Chart object attributes, and write mml0 (or the name of the line you need) in "Object name" field.
For example (for mml2 level): http://fxdreema.com/shared/HhncDVGD
-
Ok fxDreema.
Thanks for the instruction.
-
Hello fxDreema. Alright?
So ... not working properly. Before opening was several orders at the same time, and now that I placed an order to open a candle, does not work properly.
Where am I going wrong?
Here is the initial design: http://fxdreema.com/shared/lRHEtVz4e
-
This incidator moves up and down when it wants, I don't know how it's to be used. Now to open a trade you have to cross-down the upper level of cross-up the lower level... something like rare situations (especially with Once per bar), but I got one trade in my backtest here, and then it was closed immediately. Everything works according to the project

-
This indicator serves as pivot points, support and resistance. It changes according to the market, but I have no problem as this, because EA has to open an order as the line. I just did a test with the indicator and put in the graph, but it does not open as conbinado.
Attached is the log file.
......
20130814.log -
Are you sure that you want to open a new trade when mml2 is crossed from below and mml10 is crossed from above? Even that way there is a trade... I tested it on 5 minutes.
-
No. .. is the opposite. When crossing up the mml2 - Buy;
When crossing down the mml10 - Sell.It is contrary to what he said. Please check that the blocks are correct. At the Visual backtest MT4 broker ActivTrades opened 1 or 2, but not opened more often as this logic. Ie many signs flawed.
-
Oh, I think I know the problem... you have Once per bar, and then you check Candle 0. But Candle 0 is just opened and it does not have a look. Maybe you want to work with Candle 1, ot to place Once per bar after conditions.
-
Should be just that. I want to open only one order per sailing, even if the candle shift 0. Where is wrong?
-
I told you, it's important where "Once per bar" is placed - before or after the condition. Every "Once per bar" block has independent internal memory and it knows if it was passed for the current bar, or not.
What's wrong in your project is that when a new bar is opened, you ask if there is a crossover. Crossover (x>) in case of Candle Close is:
if CandleClose[0] > indicator AND CandleClose[1] < indicator
Normally it's like this:
if CandleClose[0] > indicator[0] AND CandleClose[1] < indicator[1]
... but your indicator is just a horizontal line.
-
__What's wrong in your project is that when a new bar is opened, you ask if there is a crossover. Crossover (x>) in case of Candle Close is:
if CandleClose[0] > indicator AND CandleClose[1] < indicator
Normally it's like this:
if CandleClose[0] > indicator[0] AND CandleClose[1] < indicator[1]
... but your indicator is just a horizontal line.[/quote:igb6s3fv]
Now I understand how the Crossover.So ... how should i do to work properly? Actually before the block "Once a bar" was working properly, if I remember the times he opened and closed several orders almost simultaneously. I need you to open only one order.
-
How a candle looks at the beginning? "Once per bar" happens when a new candle is created, how is this candle looks like at this very first moment of it's existence?
-
I'm sorry, but I do not understand it correctly. The communication is not going very well because I communicate through a translator. I need to work and open once a signal. Please show me in a example project as I do in this way.
-
Your project (the one you posted in this topic) does not work properly because you check for crossover in the moment when a new candle is created, but in this moment the candle looks like a small point, it has no body and wicks, so it's not a good idea to check for crossover in this way.
The alternative is to put "Once per bar" after the conditions (two "Once per bar" blocks), or to work with Candle 1, which is already fine - with body and wicks. -
So ... Indeed my logic identical to this crossover "fxDreema example EA - Price crossover"

Try putting 1 block "Once per bar" for each block condition, if that's what I understood.
I'll test.
If I do not understand, please make a sample project so that I can understand.
-
Still not working properly
Please a project as an example, please!
-
Put "Once per bar" blocks below conditions.
-
Thank fxDreema. Now funcinou sales orders and it seems that this also ok purchase.
But it did not work now the closure order. Recalling that the closure is in line mml11 sell and buy is closing mml1
Here is the new project: http://fxdreema.com/shared/quOwhMhmd