[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 899

 
belck 10.10.2010 10:55
DhP:

Как правильно записать в советнике и получить в нём результат индикатора?

double ROC = iCustom(NULL,0,"ROC",12,0,0); - данные не выводит.

double ROC = iCustom(NULL,0,"ROC",12,0,0,0); - данные не выводит.

double ROC = iCustom(NULL,0,"ROC",12,0,0,0,0); - данные не выводит.

Индикатор: https://www.mql5.com/ru/code/9340

правильней будет вот так:

double ROC = iCustom(NULL,0,"ROC",0,0);

но я не могу понять, что вы будете дальше с ним делать. ну может мне и не нужно понимать )


Thank you for your participation.

The indicator, sad as it is, does not give out any data in the EA. The indicator itself works, but I can't get its results in the EA.

It is unfortunate.

P.S. To get the INPUT-OUT signal.

 
DhP:

Thank you for your participation.

The indicator, sad as it is, does not give out any data in the EA. The indicator itself works, but I can't get its results in the EA.

It is unfortunate.

P.S. To get the INPUT-OUT signal.

I will tell you honestly and immediately - this is a bad indicator for determining the entry and exit!

Think ahead, what if the indicator is wrong (you do not forget that each indicator is equal to a coin flip, according to probability theory it comes out that = 50/50):

- You bought and the price went down.

- Ok, the indicator has guessed, and everything went right, but when to close?

A more interesting variant would be this:

double Tenkan = iCustom (NULL, 0, "Ichimoku",0,0); 
double Kijun = iCustom (NULL, 0, "Ichimoku",1,0);

but here we need to work on identifying the true crossover.

Indicator: Ichimoku.mq4

description:

The Ichimoku Kinko Hyo technical indicator is designed to identify the market trend, support and resistance levels and to generate buy and sell signals. This indicator works best at weekly and daily charts.


Four time intervals of different length are used to determine the dimension of parameters. Values of separate lines forming this indicator are based on these intervals:


Tenkan-sen shows the average value of the price for the first time interval, defined as the sum of maximum and minimum for this time divided by two;


Kijun-sen shows the average value of the price for the second time interval;


Senkou Span A shows the midpoint of the distance between the previous two lines shifted forward by the value of the second time interval;


Senkou Span B shows the average value of the price for the third time interval shifted forward by the value of the second time interval.


Chinkou Span shows the closing price of the current candle shifted backwards by the value of the second time interval. The distance between the Senkou lines is shaded in a different colour on the chart, and is called a "cloud". If the price is between these lines, the market is considered to be non-trend, and then the cloud edges form the support and resistance levels.


If price is above the cloud, the upper line of the cloud will form the first support level and the second will form the second support level;


If the price is below the cloud, the lower line forms the first resistance level and the upper line forms the second resistance level;


If the Chinkou Span line crosses the price chart from the bottom to the top, it is a buy signal. If the line crosses the price chart from the top downwards, it is a signal to sell.


Kijun-sen is used as an indicator of market movement. If the price is above it, prices are likely to continue to

increase. When price crosses this line, a further change in trend is likely. Another way to use

Kijun-sen is a signal. A buy signal is generated when the line Tenkan-sen crosses Kijun-sen

from the bottom upwards. Downwards is a sell signal. Tenkan-sen is used as an indicator of market trend. If this line

This line ascends or descends - a trend exists. When it goes horizontally - the market has entered the channel.

Expert Advisor on this indicator: https: //www.mql5.com/ru/code/9576

Files:
ichimoku.mq4  5 kb
 

Thank you.

Alone, all indicators 'err' and cannot work on their own without receiving confirmation from other indicators.

Nevertheless, the desire to run ROC has not yet died down. The only disappointment is that I cannot get indicator's data in my EA. I will have to refer to the author.

Thank you again for your participation, although it has not solved my problem.

 
DhP:

Thank you.

Alone, all indicators 'go wrong' and cannot work on their own without receiving confirmation from other indicators.

Nevertheless, the desire to run ROC has not yet died down. The only disappointment is that I cannot get indicator's data in my EA. I will have to refer to the author.

Once again, thank you for your participation, but it does not solve my problem.

If you do not understand it, you will be able to do it.

 
DhP:


Individually, all indicators are "wrong" and cannot work on their own without receiving confirmation from other indicators.

And the other indicator can also show a wrong entry on confirmation. and it turns out

Indicator1 + indicator2 = 0% correct market entry or 100% correct market entry - but how to determine this?

It turns out that if it is 0%, then we don't need to open, and we open as indicated:

Signal indicator1 = TRUE;

signal indicator2 = TRUE;

if (signal indicator1 && signal indicator2) OpenOrder = TRUE; // but here it turns out to be 0% and this signal can become fatal!

 

Good afternoon!

Can you advise me on the following situation?

i am running Metatrader, i have 21 currency pairs in my profile, i have charts open at random timeframes, then i run the script, which uses all these currency pairs in its working range M15 - H4 to search for trading signals

i sometimes notice that the signals are not correct.

i think maybe not all quotes are updated in the terminal before using them in the script?

if the chart is not open, but the data is being handled in the script.

I do not know what to do with it.

 
Gravitus:

Good afternoon!

Can you advise me on the following situation?

i am running Metatrader, i have 21 currency pairs in my profile, i have charts open at random timeframes, then i run the script, which uses all these currency pairs in its working range M15 - H4 to search for trading signals

i sometimes notice that the signals are not correct.

i think maybe not all quotes are updated in the terminal before using them in the script?

i also want to know how the quotes for a currency pair / timeframe are updated, if the chart is not open, but the processing of this data in the script is going on?

I do not know what to do with it.

Put it on just one currency pair;

or

change the magic at every trade

 
belck:

place on only one currency pair;

or

change magic every time you place it

The script is only used to search for signals, not to open positions... Is there any way to force quotes to be updated on more pairs/fps at once?

 
DhP:

Thank you.

Alone, all indicators 'go wrong' and cannot work on their own without receiving confirmation from other indicators.

Nevertheless, the desire to run ROC has not yet died down. The only disappointment is that I cannot get indicator's data in my EA. I will have to refer to the author.

Thank you again for your participation, although it hasn't solve my problem.


Try this variant. In my time, I refined it to work correctly in the EA.

There is one small logical error in CodeBase

Files:
roc.mq4  3 kb
 
Thank you, it's working now.
Reason: