Checking the minimum stop in EAs published in the marketplace. - page 13

 
Ihor Herasko:

I think you should be clear about the question)). In the meantime, you're confused:

and through the post:

If server returns 0 and stoploss on EA is less than minimum, e.g. 1

then

construction

 if(stoploss<minstop)stoploss=minstop;

Incorrect it does nothing, stoploss and will be = 1.

the user will get an error message about this.

this is a normal situation, the user should watch out for this! he should not set Stop Loss = 1. (we are not talking about virtual stops)

He gets an error returned to him - he looks - wrong stops, less than the minimum - goes to his broker's website!!! and reads - min stop on the server = 18 pips.

They need to clearly programmed, if the stoploss is less than the minimum(and how do you check this? correctly, the error 130) then assign a minimum

but minimum = 0 - because it floats.

Question: how to find a solution to this problem. If it is said that the error 130, returned by the EA, is a stop sign for the EA and it is not allowed into the market. And the minimum stop level on the server = 0. 1 is bigger than 0. But error 130 appears

 
Ihor Herasko:

Not on the MetaQuotes server, but when checking in the marketplace (see the first post of the thread):

Looking, and... Do you think the moderators are testing on left-handed brokers with their quirks?
How many moderators have me and all on the MetaQuotes server.
 
Vladislav Andruschenko:

If the server returns 0 and the stoploss on the EA is less than the minimum, for example 1

it should beclearly programmed, if the Stop Loss is less than the minimum(and how do you check this? right, error 130) then assign the minimum

but minimum = 0 - because it is floating.

Question: how to find a solution to this problem. If it is said that the error 130, returned by the EA, is a stop sign for the EA and it is not allowed into the market. And the minimum stop level on the server = 0. 1 over 0 means everything is ok. but error 130 appears

How horrible, how complicated and confusing it all is :)

If SL or TP is less than the stop level, we just need to set "0" and open an order without SL or TP, or do not open an order and display a message about an invalid SL or TP.

 
lilita bogachkova:

How horrible, how complicated and incomprehensible everything is :)

If the SL or TP is less than the stop level, we just need to put "0" and open an order without SL or TP. Or do not open an order and display a message about an invalid SL or TP.

ok

but stop level = 0

then what? i.e. open an order without a stop? That's pi......

it turns out that if a guy has put 10 and it is less than the broker's minu level = 18, but more than the server - because the server = 0, then just remove the stops and let the pose itself walk?

 
Vladislav Andruschenko:

OK

but stop level = 0

then what? i.e. open with no stops? It's pi....... eeverything.....

it turns out that if a guy puts a 10 and it is less than the broker's min-level = 18, but more than the server - because the server = 0, then just remove the stops and let the pose walk?

Yes no why, after opening check for '0' if 'true' modify. When modifying there is no slippage unlike opening, I think all because of the slippage in pips greater than the specified TP or SL.
 

Now you've gone as far as 13 pages. :)

 
lilita bogachkova:
I don't know why, we check '0' after re-opening, if 'true', we modify. No slippage when modifying unlike re-opening, I think it's because of slippage in pips above the specified TP or SL.
Vitalii Ananev:

Now you've gone as far as 13 pages. :)

We want everything to be perfect and not to have a single error from the server - that's what we are trying to achieve
 

set a minimum stop at which your trading system will work and in case of a lower value, swap to the minimum value

 
Alexander Bereznyak:

set a minimum stop at which your trading system can work and in case of a lower value make a swap to the minimum value

this applies to a specific Expert Advisor,

I am talking about a universal Expert Advisor - which has no strategy in which all the rules are set/selected by the user.

 
the last suggestions did not help