Specify crossover candle?
-
Greetings,
Please, I would like to ask how to specify the candle at which MA's have crossed over? More specifically, Im trying to achieve the following condition:
Daily timeframe, MA 10 < MA 20, If price is less than the low of the day of crossover, sell.
Note, that price may wander off for several days and not reach that point, until it just gets there eventually. Thus, specifying candles by candle ID is useless in this case, because it may take several days until it reaches that point. Any ideas please?
Thank you.
-
I surrender with this question

The only block that does iterate through candles and comparing indicator values is "Indicator moves within limits", but this block does not output anything. The other way to get some information is via "More options" when you are using custom indicators, because only for custom indicators there are more options in "More options"
The other way is to use "Loop (pass N times)", but because this block is too basic and there is no break mechanism, I would not use it for this case.What else... you can set some Variable and remember the price when the crossover happens, but when the EA is restarted, this information will be lost. And this information works only in forward direction.
I think the best would be to have some custom indicator that outputs the information you need. Unfortunately fxDreema cannot build indicators

-
__I surrender with this question

The only block that does iterate through candles and comparing indicator values is "Indicator moves within limits", but this block does not output anything. The other way to get some information is via "More options" when you are using custom indicators, because only for custom indicators there are more options in "More options"
The other way is to use "Loop (pass N times)", but because this block is too basic and there is no break mechanism, I would not use it for this case.What else... you can set some Variable and remember the price when the crossover happens, but when the EA is restarted, this information will be lost. And this information works only in forward direction.
I think the best would be to have some custom indicator that outputs the information you need. Unfortunately fxDreema cannot build indicators :)[/quote:2qxos7uj]
Well, thank you anyway. Now that you mention custom indicators, I may try to have something like an arrow pointing to the candle of the crossover. When price crosses for example below the low of that candle (and all the other conditions are met aswell), trigger sell order. I just need to figure out where to get such an indi 
-
Ok, I have managed to get an indicator that paints an arrow above or below the candle where crossover happened. See the picture attached: http://imgur.com/ueOksdT
Now, the thing is that I wonder which blocks to use to create the condition I would like. That is:
Long - Condition 1: EMA 10 > EMA 20
Condition 2: Bid x> High of the candle where the arrow (green one) is paintedHow do I go about with the second condition? Firstly I though of using the block indicator is visible... But that does not specifically select the candle where the arrow is painted. Moreover, the arrow is NOT painted exactly at the high/low of the candles, thus using the condition bid x> indicator is not an option as well. Help please?
Thank you.
-
Arrows are not arrows. Indicators have buffers, Buffers are arrays with data - one value per candle. Where you don't see arrow, line or whatever graphical thing, the value is EMPTY_VALUE, which is a constant with value that is the biggest integer number. Otherwise the value is the price value where the graphical element is, let's say 1.23456.
Use the "Trace" block to see what is going on.
"Indicator is visible" passes if the value is different than 0 and EMPTY_VALUE. Sometimes indicators are giving value of 0 instead of EMPTY_VALUE.
"Indicator is visible" is almost identical to "Condition", where you have something like The Indicator > 0. This is because "Condition" does not pass at all if one of its values equals to EMPTY_VALUE.
Only for custom indicators in "Condition" you have extra options in "More settings" - some of them allows you to find the latest "visible" value of the indicator. By "visible" I mean different than EMPTY_VALUE. Try these options.