THE IDEA EXCHANGE - page 13

 
Thank you! I'll give it a try.
 
Vinin:
rid:

The scale on the graph is too crude. Four decimal places is not enough! We need to add a fifth.

Dear Sirs! Please advise what to do to increase the sensitivity of the scale in the indices by 1 decimal place.


In the init section of the indicator just write IndicatorDigits(Digits+1); We will get one more digit. If we do +2, we will get two additional digits.

I was going to do it. But I have second thoughts... The Expert Advisor's trend detector uses built-in indicators. They do not seem to be easy to access. So, what is going to happen? I will have to change the built-in indicators for custom iCustom ones in my Expert Advisor ?

But in the trend detector we "hang" MA on the Bulls indicator. The iMAOnArray mode is not available in the custom indicators. So what to do now?

 
rid писал (а) >>

I was about to prescribe it. But I wondered... The Expert Advisor's trend detector uses built-in indicators. They do not seem to be easy to access. So, what is going to happen? I will have to change the built-in indicators for custom iCustom ones in my Expert Advisor ?

But in the trend detector we "hang" MA on the Bulls indicator. The iMAOnArray mode is not available in the custom indicators. So what to do now?

Vinin wrote it...

BULLS = HIGH - EMA
BEARS = LOW - EMA

...so you just build

specify in the init the number of digits = 6

in source

double EMA = iMa(....); // - average with proper period

double BULLS = HIGH[i] - EMA;
double BEARS = LOW[i] - EMA;

double delta = BULLS - BEARS;

And then you work with delta in its dimension of digits after the decimal point.

 
esmaster писал (а) >>

and then you work with the delta in its dimension of digits after the decimal point. and no inductions in custome. and it will work faster.

>> thank you.

 
esmaster писал (а) >>

So Vinin wrote...

BULLS = HIGH - EMA
BEARS = LOW - EMA

So you just build

in the inite you put the number of digits = 6

in the source code

double EMA = iMa(....); // - average with the desired period

double BULLS = HIGH[i] - EMA;
double BEARS = LOW[i] - EMA;

double delta = BULLS - BEARS;

And then you work with the delta in its dimension of digits after the decimal point.

not even half a year =))

 
leonid553 писал (а) >>

Hello all. I propose to use the so-called "Trend Detector". I wasn't expecting such a good result from this find of mine. Accidentally blinded it - put it in. I insert this part into almost every Expert Advisor and even a losing Expert Advisor yields some profit! It decreases the number of trades against the trend (mostly losing ones) and greatly increases the Profitability parameter of the Expert Advisor, often to at least two! This means that outside the optimization period we are much more likely to make a profit!

Here's the idea: we take BearsPower and BullsPower indicators (bulls power and bears power) and compare them to each other. But just compare them - it's a pain in the neck. To do it programmatically is cumbersome. That's why I put MA on them and compare MA values on zero bar! Just add up these values = Delta. Further everything is simple. If DELTA ..>0 - the trend is up. Otherwise it is down !

We just need to add to the condition to buy if ((Delta>=0) && ... ...

And in the Sell condition - if ((Delta<=0) && ... ...

In external parameters of any Expert Advisor, insert :

You don't have to insert it. But then you have to pick up these parameters and insert numerical values instead of variable names directly into the code. And here is the block itself :

Here is an example of how an EA works with the Trend Detector. We can see that in case of an up trend, the buy positions are opened, and vice versa.

Perhaps someone will have suggestions for improvement and refinement of the design. I would like to know how promising this trend detector will be.

Maybe, we should create some indicator like "Trend Detector v1.0". Since not everyone here has the ability to program........

Judging by the results, the idea is good and most importantly working......

Thanks in advance!!!!!

 
Cyklik писал (а) >>

Maybe some kind of indicator, like "Trend Detector v1.0". ///

It is unlikely to succeed right away. MA lines in the iMAOnArray mode, when used in the Expert Advisor, are not displayed on the visual mode chart. But manually placed lines are displayed well. Perhaps, your request will be implemented by a specialist who will be able to combine two MAs from different indicators in the iMAOnArray mode in the indicator window

I do not have enough knowledge for that. //

It is easier to insert the trend detector into any Expert Advisor and display

of a chart with several Comment ("Delta ", Delta, "\n") - taking values from different timeframes ..... - I've even seen such a construction somewhere!

//-----------------------------------------------------------------------------------------------

A little later (now gone to work.) risk to offer present curious "puzzle" - logical-software type. Who knows, maybe in future it will reveal some interesting perspectives...

 
rid писал (а) >>

I was about to prescribe it. But I wondered... The Expert Advisor's trend detector uses built-in indicators. They do not seem to be easy to access. So, what is going to happen? I will have to change the built-in indicators for custom iCustom ones in my Expert Advisor ?

But in the trend detector we "hang" MA on the Bulls indicator. The iMAOnArray mode is not available in the custom indicators. So what to do now?

who gave you this trick ))))

 

Combined the two Bears and Bulls indicators into one... Just put them together... And this is what I got... (There may be something similar already)

Files:
 
I think I managed to make the blue dream of iMAOnArray into a code before Korey finally trampled it with his rough boot. :))
Files: