Basic questions from a newcomer - page 3

 
Leanid Aladzyeu:

I added a product to the market, the moderator said to add a Free Funds Control.

The condition he gave me, but what action should it perform?

I can set the counter to infinity (thereby the robot will wait for reloading.), Notification to the user at least on a mobile phone. I can set the counter to infinity (the robot will wait for the robot to restart).

If you're talking about an EA, you probably need to add a code to control the available funds (probably during the tests we found errors of insufficient funds when trying to open new positions).
 
Karputov Vladimir:
If it's an EA, you probably need to add code to control free funds (probably tests have revealed errors of insufficient funds when trying to open new positions).
I see . What should the equity control do? I mean, what action should it take?
 
Leanid Aladzyeu:
I see . And what should control the available funds do? I mean what action should it take?

For example, control the available funds before sending a buy or sell order.

 
Karputov Vladimir:

For example, control the available funds before sending a buy or sell order.

Well, what is there to control if there is an error on insufficient funds?!

Now I finalize the wrapper and set a timer for critical errors to infinity + Alert. ( information about the error, and stop the EA ) .

Will it work? It will not be considered as a bad deed to users?

 
Leanid Aladzyeu:

Well, what's to control if an error on insufficient funds is given ?!

...

What if you think about it?

 
Karputov Vladimir:

And if you think about it?

I was thinking while writing your answer))) The calculation in the function lot optimizer comes fromEquity

And it may be busy and an hour later free).

 
Leanid Aladzyeu:

While writing your reply I was thinking)))) the calculation in the function lot optimizer comes fromEquity

And it may be busy and an hour later free)

You may use it in an hour and it will be free in an hour. And you don't need a timer to catch errors.
 
Karputov Vladimir:
That's good. And you don't need a timer to catch errors.

Is that OK? Simple and tasteful)) .

The code is not inserted, something is wrong again. I took a screenshot))

 
Leanid Aladzyeu:

Is that OK? Simple and tasteful)) .

The code is not inserted, something is wrong again. I made a screenshot))

Imho, this will be better. I think the point is clear.
   if(this.lot*MarketInfo(_Symbol,MODE_MARGINREQUIRED)>AccountFreeMargin()){
      logText=StringConcatenate(NOTENOUGTHMONEY_1,this.lot);
      Log(logName,logText,false);
      return false;
   }
 
Ivan Vorontsov:
Imho, that would be better. I think the point is clear.

I like it better this way))) the final version