Discussion of article "Step-by-Step Guide to Writing an Expert Advisor in MQL5 for Beginners" - page 24

 

Hello Guys, i am hoping everyone who will see my comment are good. all heard about the beast super signal of mt4.
After severals looking for mt5 i didn't find. So i decided to make myself this indicator because i know the parameters of the indicator and the conditions to buy or sell use into, but i don't master well the coding to add the conditions ( Buy/Sell) to finalize the indicators.
in below you will find the file of beast super signal ex4, for mt5 i started but hard to finish this,the screenshot of the programming where i stopped.


<*.ex* file has been deleted>

 

Hello Samuel,

I was going to create an EA with the stochastic indicator but I stumbled upon your article, I have tested the code and I have no error, it works great, I used it with $10,000 demo account. But how can we do to use the code with a small fund of 500$.

Joy

Files:
 
Enlighten, who knows, why sales open non-stop, one after another, when the condition of the advisor in the presence of only one open position to sell ?
 
akarustam open position for sale ?

Because there is an error in the EA.

 
PapaYozh #:

Because there's a mistake in the EA.

It is clear, I am trying to find the error, but the compilation is perfect, so I am digging further. Violations of the condition of the only deal for demo-sale happened on the minute chart, while the condition of the only deal for demo-purchase was observed, when demo-trading on the five-minute chart, everything turned upside down, now the condition of the only deal for demo-purchase is violated, while the condition of the only deal for demo-sale is observed. I'm testing on a 10 minute chart, hoping everything will settle down. I would like to understand what is going on here?

 

And I would also like to understand why in the conditions of the Expert Advisor set one stop and take profit, but open other ?

 
However, with the update of the Expert Advisor on Insta, the violation of order singularity is repeated, the order rushes and rushes, opens and opens, also on Roboforex. On XM can not open a position, neither to buy, nor to sell.... says 2022.04.22 23:31:59.775 Trades '64723468': failed market sell 0.1 EURUSD sl: 1.07897 tp: 1.07897 [Unsupported filling mode]... it's not clear yet what it is, I tried without stops and take-outs at all, and I tried to double the signs... the rest seems normal....

 
akarustam open a position, neither to buy, nor to sell.... says 2022.04.22 23:31:59.775 Trades '64723468': failed market sell 0.1 EURUSD sl: 1.07897 tp: 1.07897 [Unsupported filling mode]... it's not clear yet what it is, I tried without stops and take-outs at all, and I tried to double the signs... the rest seems normal....

Put it on 10 different brokers. All have to be manually adjusted. Problems in the tester already. And in real life the peaks differ in 1000 pips on demo, and in real life more. So they can always kill the SL of 500 pips in the kitchen.

 

Having a little digging in the code of the programme, it seems that there is no description of the condition of limiting the opening of only one position. The condition is there, but I did not find the execution.... I am a novice programmer, a dummy, but I checked the programme description in detail and repeatedly. Maybe a programmer should take a look at it ? The very idea of the programme is wonderful, but while I will learn programming at its level a lot of time and money will be lost. What to do?


I am waiting, waiting for a breakthrough and suddenly it seemed to me that I was the only one who was clear about the lack of execution of the declared condition of the open position singularity in the programme, well, at least for one of the two directions, selling or buying. Am I a genius in programming? Among the huge history of discussion on the forum ? After all, there are programmers on the forum worthy of this, now common for all problems ? Save the dummy from conceit, or I will be lost ... Have mercy? Or throw slippers at me? Time, which is money, is wasted.

 
Rustam Ayupov open position singularity in the programme, at least for one of the two directions, selling or buying. Am I a genius in programming? Among the huge history of discussion on the forum ? After all, there are programmers on the forum worthy of this, now common for all problems ? Save the dummy from conceit, or I will be lost ... Have mercy? Or throw slippers at me? Time, which is money, is wasted.

Hello, Rustam!

Replace the code in both lines 195 and 241:

195     if(Buy_opened)
.
.
.
241     if(Sell_opened)

with the code:

if(PositionsTotal()==1)

Regards, Vladimir.