[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 91

 
Oper писал(а) >>

I studied one area of the MA thoroughly. There can be no mistakes. I put the mouse on one point,

Then I moved it strictly one millimetre higher - value changed by

But then moved it again (strictly on the millimeter!) And the value has changed dramatically by 8 (!) points.

I checked it a hundred times. And now I checked it on another segment on H1.

after the candle closes, but the value jumps a hundred percent.

Looks like we're talking about a zero bar. Then congratulations. You have made a discovery (although for yourself). The zero bar chatter exists.

 
Hello, the question is probably more for advanced programmers than for beginners like me, but my idea will be useful to both! So the essence of the question, is it possible to write an indicator or advisor operating on two indicators? I would like to write it myself, but Unfortunately, I do not possess such knowledge, and I would like to seek help from those who are also interested in this idea or to those who have the necessary knowledge in this area.
 
Vinin >> :

It looks like we're talking about bar zero. Then congratulations. You have made a discovery (really for yourself). The zero bar choppiness exists.

In addition to the fact that the MA has such gaps of values (on H4 they are up to 20 points),

there are reciprocal areas in which the value remains in place in spite of the fact that even visually

Maybe you can tell us how to make MA at the moment of their appearance on the chart?

of a new line point reported exactly the value (price) at which it appeared?

In other words, the value of MA at a certain point strictly corresponds to the value of the Moon.

To the value of the price.Is it possible?

P.S.I do not know, whether it is the zero bar, but I will try to explain.

Try on any chart larger than H1, create a simple MA

Let it be 8. stretch the chart to display the minimum number of bars in the window.

Now carefully go over the indicator and observe the change of its value.

 
Oper писал(а) >>

In addition to the fact that the MA has such gaps in values (on H4 they are up to 20 points),

There are reciprocal areas where the value remains in place, despite the fact that even visually

Maybe you can tell me how to make the MA at the moment of occurrence of

Maybe you can advise how to make MAs report the value (price) at which they appeared?

I.e., it is necessary that value of MA in a certain point strictly corresponds to value of the price.

Is it possible?

P.S. I do not know, whether it is zero bar, but I will try to explain.

Try to create a simple MA on any chart larger than H1.

Let the averaging be 8. Stretch the chart to display the minimum number of bars in the window.

Now gently use the indicator and monitor the change of its values.

Build the mask by opening prices. And the first value you see will not change any more.

 

I am still at the very beginning of learning MQL4 and I am practicing writing EAs.
Please explain how an EA should look like.

At 00.00 o'clock, when the daily bar has finished forming and a new bar has started to form
, a pending order is placed (or a non
triggered order is modified or nothing is done to the market one) with definite Take profit and
Stop loss. The opening price of the pending (modified) order
is calculated using the OHLC of the newly formed daily bar.

1. What timeframe should I use to test this EA?

2. What should the part of the code intended for the time of 00.00 look like?

I saw such a variant


int T=0; // Заданное время
datetime T_tek; // Текущее время
T_tek=TimeCurrent(); // Прошло секунд
if (TimeHour(T_tek) == T) // Время - 0 часов

and like this


...
extern datetime Open_Time=D' 00:00'; // Время открытия ордеров
...
...
if(Open_Time/60==TimeCurrent()/60)
...

and this one


...
extern int Open_Time=0; // Время открытия ордеров
...
...
if(Open_Time==Hour())
...


Or, if day bars are used, would it make no sense to bind to 00:00:00?

3. If (for example) I test on the M5 timeframe, how should I enumerate the time series iOpen(iHigh,iLow,iClose) for the Day timeframe? How should this part of code look like?

Something like this


...
double OO; // Open
...
for(int a = 1; a <= Bars; a++)
{
double OO=iOpen[Bars-a]; // Присваиваем OO Open сформир. дневного бара

 
Vinin писал(а) >>

It looks like we're talking about bar zero. Then congratulations. You have made a discovery (really for yourself). The zero bar chatter exists.

>> yes, yes, hello! How is it?)))

 
grebec писал(а) >>

Yes, yes, hello! How is it?)))

Use that bar(s) that will no longer change.

 
Vinin >> :

Build the waving on the opening prices. And the first value generated will not change any more.

The question I'm trying to find an answer to has already been asked and answered by you.

It goes something like this: "How do you get the price at the time
>> He said it like this: "How to get the price at the moment when the new MA point appears" - this is the question I'm searching for an answer to, but it's hard to find it.

It has nothing to do with bars, opening, closing and indicator settings.

Take the dummy, take a point on it, draw a horizontal line from it to the right..,

until it hits a price. That's the price of the point on the indicator.

But the problem is that the value of the indicator at this point very rarely corresponds to the price at which

And we just need the value of the indicator

How can we achieve this?

P.S. How else to explain it better, I do not know.



 
Oper писал(а) >>

The question I am trying to find an answer to has already been asked and answered by you.

I don't know how to explain it better, I don't know how to explain it better, just lay out the screenshots.
I'm looking for an answer to this question too.

Bars, opening, closing, and indicator settings have nothing to do with it.

Let's take a mouse, take a specific point on it, draw a horizontal line to the right from it,

until the line hits a price. That's the price at which the point of the indicator was drawn.

But the problem is that the value of the indicator at this point very rarely corresponds to the price at which

And what we need is for the value of the indicator

How can we achieve this?

P.S. How else to explain it better, I do not know.

I don't know how else to explain it.

 
Gentlemen. how to make H4 trading take into account H1 bars ? e.g. if(......&& Close[0](H1 bar)>High[1](H1 bar) ???????????
Reason: