Check last 100 bars
-
Isn't that specific to that indicator? I'm trying to create universal blocks that works in most common situation, but this thing... how can I explain it? If in the last X bars if buffer 1 is !=0 Y more times than buffer 2 is !=0 - then pass...
-
Thanks for the reply.
I don't think that bullish/bearish is unique to this indicator at all. A huge number of indicators seem to utilise such a technique, whether it be an oscillator or a line on the chart. Their output from a pair of buffers changes when they signal bear or bull, going from !=0 to =0. I gave an example of one in http://fxdreema.com/shared/9DEU4BIG.
I fully understand that you are wanting to produce something universally useful, and wouldn't want you to compromise that.
So, with that in mind, and looking at the chart I attached earlier today, I can't see how I can get fxDreema to pick up this buy signal when there is a minority of bearish candles scattered randomly through it.

-
Is the "fuzziness" setting on the "Indicator visible\invisible" blocks going to be workable?

I'd also like to make another suggestion related to this. On the "Condition" blocks, would it be possible to have the same "Additional candles" field you very kindly introduced to the "Indicator visible\invisible" one? This would make it easy to do a condition which says, "for the last n candles, the close price was above moving average y". At the moment I only seem to be able to do this using multiple condition blocks... of course, you may say I've missed something already there, in which case, please accept my apologies, and please tell me where!

Thanks again for your help. Its much appreciated!

-
What "Condition" block do - it compares 2 values (operands) and if the comparison is true, it passes.
What Indicator is visible for the current candle and for the additional candle means - inside the block we check if the indicator is visible for the current candle (3 conditions inside - different than -EMPTY_VALUE, different than 0 and different than EMPTY_VALUE), then repeat that for all the additional candles.
In "Condition" you want to get the number of occurrences where the indicator is visible in once-per-bar fashion (because in Condition for each operand you should have simple value), and with some options if possible... (more at the beginning, more at the end, and who knows what else) so you can compare that number with the other operand. But unfortunately I have no plan to work for that right now, because the "Condition" block is not prepared for things like this. I have plan to add drop-down selector for every indicator, where we will be able to choose << Current value | Last positive value | Last negative value | Candle ID of the last visible value .... >> things like this, as universal as possible. So, there is a chance for "For how many candles that indicator was visible in the last X candles"... but I think the chance is very little
Why? Because after all this is job for the indicators themselves - yes, indicators are meant to give proper signals for the EA, not to be cracked into working in a way that they are not supposed to work, and if the indicator needs to draw simple arrow when for X candles... whatever happened... then if this procedure is too unique, I prefer to skip it and redirect people to some of the well known forums where they can find enthusiasts who can eventually put some simple code inside some indicator in order to work the way that is needed 
-
Oops! I'm really sorry. I think I may have explained myself badly.
I was talking about two different things, so I'll try to be clearer.
*===//===[/list:u:2j2viy3t]
1 - "Indicator visible" and "Indicator invisible" blocks
I talked of "fuzziness" here. By this I meant, would it be possible to get the "Indicator visible" block, for example, to pass even though there might be a few random bearish signals in an otherwise majority of bullish signals in the indicator's trend? I used the following picture as example to illustrate, and said that there are many indicators that use different buffers (buffer 1 red, and buffer 0 blue in this one) to show bullish/bearish in an overall trend:

The bars are mostly - but not all - blue, but this is still overall a buy signal. When buffer 0 != 0, then the bar is blue.*===//===[/list:u:2j2viy3t]
2 - "Condition" block
For this block I wondered if it would be possible to have the block compare 2 operands in this way: "pass if the close price of the last n candles is above moving average y". This is different to the "Indicator visible" and "Indicator invisible" blocks. So in the picture below, the condition would pass if, say, the close price of the last 3 candles was above the moving average (brown line):

*===//===[/list:u:2j2viy3t]
And I do understand that you have a development plan that you are working to, and making ad hoc changes here and there may not be suitable for you. However, I do believe that these small features will make fxDreema more powerful and more attractive to users.
Just a friendly thought - or two!

......
Clipboard03.jpg
Clipboard02.jpg -
And I am very picky when it comes to new features, because every line of code that I write will make things good or bad in the future

So you are thinking about the interaction between two indicators in time (candle close is also indicator). This is not for "Condition", because in "Condition" you compare 2 values, but it's not possible to do that for X candles in the same block. It's maybe possible to extend the "Condition" block to work with additional candles, but this is new concept right now and I'm not sure how good is it and how to do it. Otherwise in a block this can be done easily - we put 2 indicators there, and do something with them... but I still don't understand all the things, or al teast I don't know how to name such a blocks. But if you have an idea how to name them...?

-
Yes. I'll give this some thought. If I could program, I'd do it for you! Maybe one day I'll learn...

-
You are, of course, right - as always! - about my number 2 item above (my post of Wed Aug 28, 2013 11:09 pm).

Using the "Indicator moves within limits" block, its quite easy to do a "pass if the close price of the last n candles is above moving average y". So we can forget about number 2! Sorry!

I'll get back to you about number 1 after I've given it some more thought.
-
I thought you want to check if Close is above MA, but for every candle - Close[0]>MA[0] and Close[1]>MA[1] and Close[2]>MA[2]... which is still possible, but with multiple blocks... It's not beautiful
I like that concept 
Number 1 - what if you use indicator with bigger period. I think you want to filter those situations where the price goes back and returns back quickly.
-
__I thought you want to check if Close is above MA, but for every candle - Close[0]>MA[0] and Close[1]>MA[1] and Close[2]>MA[2]... which is still possible, but with multiple blocks... It's not beautiful I like that concept [/quote:3vxe94p6]
Yes. This is the thought behind my number 2 item. But isn't this achievable by using the "Indicator moves within limits" block?__Number 1 - what if you use indicator with bigger period. I think you want to filter those situations where the price goes back and returns back quickly.[/quote:3vxe94p6]
Not quite. Its about making the "Indicator is visible" block allow for a number of contra trend signals to appear. Therefore in my picture of blue and red bars, the overall trend is blue, but there are a few random red bars. -
Now that I'm looking at this block "Indicator moves within limits" I realize that maybe this is how it should be, but at the moment I think it uses the same value for the upper and lower limit. But it's not hard for me to fix it, I even found a little possible problem in it, so I will check it.
For the other question, what parameter do you expect to be included to "Indicator rise"? How it should be named and what it shoud do actually?
Now what this block do is to compare the values between each couple of candles in the past (candle X vs candle X-1) and if the value of candle X is lower than the value of candle X-1 - the block fails and it does not pass. Knowing this, what it should be added to this algorythm? -
Ok, now "Indicator moves within limits" must be working in the way you expect

-
Many thanks for the update on the "Indicator moves within limits" block!

OK. So for my item numbered 1 above, "making the "Indicator is visible" block allow for a number of contra trend signals to appear", consider the following:
*Close[0]>MA[0]
Close[1]<MA[1]
Close[2]>MA[2]
Close[3]>MA[3]
Close[4]>MA[4]
Close[5]>MA[5]
[/list:u:12zx6jot]You'll notice straight away that although the trend is bullish, there is one contra indicator. However, we still want to accept this as a bullish trend. This is the same principle as using the indicator with blue and red bars (see mine of Wed Aug 28, 2013 11:09 pm).
The block needs what I called a "fuzziness" factor. In the picture below of the "Indicator is visible" block, I've added a field called "Contra indicator" which would allow the entry of a number of reverse trend candles to be ignored, or 0 for no contra indications.
*
[/list:u:12zx6jot]This "fuzziness" factor would probably be useful in the "Indicator rise" and "Indicator fall" blocks also.
Does this make sense? What do you think? Good idea, or bad idea?

(By the way - and its very minor! - you'll notice from the picture of the block that the X at the top left corner is partially obscured. This seems to happen in a few blocks. It isn't a problem, though!
)......
Clipboard01.jpg -
I added this parameter, with different name, but you will see it. The only thing is that I didn't tested it so much, so I'm not sure if it's working, but you can try it.
-
Hey! What can I say, except thank you! Brilliant! That seems to do the job nicely. FxDreema just goes on improving!

You'll see from the following picture, that a setting of block "indicator is visible" candle ID 1, and 3 additional candles, with exception of 2 candles, produces the expected result (the brown line is the "logic points tester" block):

The three candles at the right are ignored in the overall bullish trend.In the next picture, where exception of only 1 candle is used, the result correctly shows this (again, the brown line is the "logic points tester" block):

One red candle is ignored, but two are not, and the trend is considered incomplete.Thank you again!

......
Clipboard02.jpg
Clipboard05.jpg -
So everything works at least today... phew...