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

 
Vladislav Andruschenko:

I agree - don't give control, but you know how it's required, like: I want to set my own stop. make a setting.

And about the message output - thank you I will think about it.

I use both options in all EAs. If stop loss is set to zero in parameter settings, I calculate it in Expert Advisor; if it is set to more than zero, I check for the correctness and set the stop loss already set. Exceptions can be made for Expert Advisors, where the stop loss is not used at all.
 
Vitalii Ananev:
I use both of them in all EAs. If stop loss is set to zero in parameters, I calculate it in Expert Advisor; if it is more than zero, I check it for correctness and set the stop loss value already set. Exceptions can be made for Expert Advisors, where the stop loss is not used at all.

Yes, but in macret it doesn't work with correctness if server stopmin = 0.

This was not the case before - I had this check.

Now in Market the moderators intentionally set StopLoss 1 - with MinStop = 0 and error 130 comes out - product is not accepted in Market.

 
Vladislav Andruschenko:

Yes, this is only for the market - but there is no universality for any broker

the way it works is you have to make a min stop at 3 spreads in order to be accepted in the market,

The only difference is that the market accepts them - you have to make a min stop and 3 spreads, but in fact this is wrong - if a broker min stop = 1 spread - then the user will not be able to put less than 3 spreads.

Baffle.

And what's the point of putting such a shallow stop. It will be taken away by random noise movement.
 
Vitalii Ananev:
What's the point of putting such a shallow stop. It will be taken away by random noise movement.
It's not about what users put, it's clear that the stoploss is not 1 point - it's about checking in the marketplace, they specifically put stoploss = 1.
 
Vladislav Andruschenko:

Yes, but in macret it doesn't work with correctness if server stopmin = 0.

This was not the case before - I had this check.

Now the moderators in the market purposely put stoploom 1 - with minstop = 0 and error 130 comes out - product not accepted in the market. ...

By correctness check I meant what I said above about the first option. Set your own value of min stop distance.
 
Vladislav Andruschenko:

Yes, this is only for the market - but there is no universality for any broker

the way it works is you have to make a min stop at 3 spreads in order to be accepted in the market,

The only difference is that the market accepts them - you have to make a min stop and 3 spreads, but in fact this is wrong - if a broker min stop = 1 spread - then the user cannot put less than 3 spreads.

Baffle.

check, if the stop leveller has returned non-zero then use it, and if it has returned zero then Ask-Bid

 
Alexander Bereznyak:

check, if stop-Level has returned non-zero, then use it, and if it has returned zero, then Ask-Bid

but not always min stop = spread,

it is understandable to check. :-) i do check,

 
Vitalii Ananev:
By checking for correctness, I meant what I said above about the first option. Set your own value for the minimum stop distance.
is it pointing fingers in the sky or carefully checking the trading conditions of the instrument, I wrote above how
 
Vladislav Andruschenko:

Thank you. But you have the same construction as I have,

I'm sorry, but I didn't see where in your code the value of StopLevel variable is mentioned? In the code you cited, there is no change in the value of such a variable. There is a change of Stop and Profit values. As the result, if you increase them once, it will be impossible to return these values to their initial values. So, you will be chasing large stops and profits, while Stop Level has decreased long time ago.

Only you multiplied at min stop = 0 just by spread*2, but as we know at many brokers min stop = 3 spreads, why did you make 2?

I don't have information on many brokers (dozens, hundreds). With those brokers I have to deal with (as clients have accounts there), I see a figure of 2 spreads. Perhaps there is a different value somewhere.

In my opinion, this is fundamentally the wrong approach for a broker to provide information. There is a standard mechanism for getting restrictions on stopleaves. If we receive 0 on request, but in reality it is not zero. Then change it on every tick, depending on the spread value, as you need. For this reason I buy real accounts only at those brokers who represent the Stop Level value correctly.

I check for min stop on every tick.

I made a conclusion based on the name of the function - OnInitLevels. It is associated with a single action.
 
Vladislav Andruschenko:
It's not about what users place, it's clear that the stoploss is not 1 pip - the point is in the check in the marketplace, they purposely place stoploss = 1.

I did this

   if ((StopLimit<10 && StopLimit!=0)  || (StopLoss<10 && StopLoss!=0))
   {
      Alert("Error in parameters. Too small size of a parametr of 'Stop loss' or 'Stop Loss limit'");
      return(INIT_PARAMETERS_INCORRECT);
   }

The Expert Advisor has the ability to adjust the stop in 3 ways. Manually set the stop size (StopLoss) or set it to zero.

If StopLoss is equal to zero, its size is calculated based on market conditions, but limited by StopLimit variable.

And in OnInit() these parameters are checked for correctness, because it makes no sense to put a stop less than 10 points.

Reason: