Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1752

 
MakarFX #:

There is a joke.

Petka and Vasily Ivanovich are flying in an aeroplane.

Vasily Ivanovich is at the helm, an important man.

He says to Petya: "Petyka! The instrument!"

Petya says: "25!"

Vasily Ivanovich: "25 what?"

Petya: "What about the appliance?"

if (new bar and arrow up) we buy

if (new bar and down arrow) sell

Then the question is different: how do we determine which indicator arrow (buy or sell) is the last one on the chart?

 
Evgeniy #:

Then the question is different, how do I determine which indicator arrow (buy or sell) is last on the chart?

It depends on how the indicator is written.

Perhaps there is some help here .

 
MakarFX #:

It depends on how the indicator is written.

It might help here .

Funny. Too bad you can get banned for insulting you.

 
Evgeniy #:

That's funny. Too bad you can get banned for insulting you.

You'd better post the indicator and ask how to determine the last arrow in it.

You're asking telepaths riddles and you're angry that they don't guess.

 
Evgeniy #:

That's funny. Too bad you can get banned for insulting you.

The thread you have been shown is very helpful in understanding why no one has answered you yet.

 
Evgeniy #:
Afternoon. Can someone advise how to open orders in an EA on an arrow indy, not by arrow, but on each bar but in the direction of the last arrow?

Found the following solution to my question:

int current_trend = -1;
for(int i=1;i<Bars;i++) {
double buffer_buy = iCustom(NULL,0, "Indicator",0,i);
double buffer_sell = iCustom(NULL,0, "Indicator",1,i);
if(buffer_buy!=EMPTY_VALUE) {
current_trend = 0;
break;
}
if(buffer_sell!=EMPTY_VALUE) {
current_trend = 1;
break;
}
}


It may come in handy.

 
Evgeniy #:

Found the following solution to my question:

int current_trend = -1;
for(int i=1;i<Bars;i++) {
double buffer_buy = iCustom(NULL,0, "Indicator",0,i);
double buffer_sell = iCustom(NULL,0, "Indicator",1,i);
if(buffer_buy!=EMPTY_VALUE) {
current_trend = 0;
break;
}
if(buffer_sell!=EMPTY_VALUE) {
current_trend = 1;
break;
}
}


It may come in handy.

How does this help the EA to open orders?
 

Good afternoon.

There are 2 arrow indicators arrow and vertex, the task is to create an EA based on these indicators. There is no open source code for these indicators, only ex.4. I cannot use the logs to identify the necessary buffer. I have an idea to process the Alert event or log entry left by these indicators when Sell or Buy arrows appear. But I do not know how to do it. Maybe we can handle an event like "arrow appearing on the chart"?

Please help with this question.

 

Petronet #:

Handle Alert events

It's not an idea, it's a possibility, see what you can come up with:

https://www.mql5.com/ru/forum/381361#comment_25721369


Otherwise, you need to look for buffers. Look at the list of objects, if there are no arrows there, they are definitely buffers.

Как получить данные из списка Алертов. WinAPI
Как получить данные из списка Алертов. WinAPI
  • 2021.11.07
  • www.mql5.com
Я пытаюсь получить алерты из списка. из файла читать не вариант, т.к. могут быть большие задержки...
 
Hello. Signed up for the signal but not copying, what could be the reason?
Reason: