[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 183

 
NTH писал(а) >>
I found NormalizeDouble(), but it rounds. Is there a function that rounds off the unnecessary number of decimal places?

Of course there is. You'd better look it up.

 

OK, big kudos! Got it, first DoubleToStr then StrToDouble.

 
NTH писал(а) >>

OK, big kudos! Got it, first DoubleToStr then StrToDouble.

double MathCeil( double x)

This function returns a numeric value representing the smallest integer that is greater than or equal to x.

double MathFloor( double x)
The function returns a numeric value representing the largest integer that is less than or equal to x.

double NormalizeDouble( double value, int digits)
Rounding a floating point number to the specified precision.

 
Hello. Do you know why the quotes on the LiqCon-Demo demo server are not being submitted?
 

It's the weekend -....

Check tomorrow morning - should go.

 

StatBars I knew about this function, but what about negative swap values, but I'll experiment at my leisure

 

Hi all!

Help me to code:

Current time < ((opening time of candle number 1) - (opening time of candle number 5))*0.9 + opening time of candle number 1

I understand that the current time will always be less, we need a principle. And is this expression even correct?

 
NTH >> :

Hi all!

Help me to code:

Current time < ((opening time of candle number 1) - (opening time of candle number 5))*0.9 + opening time of candle number 1

I understand that the current time will always be less, we need a principle. Is this expression correct at all?

TimeCurrent() < (Time[1] - Time[5])*0.9 + Time[1]

Honestly, I don't understand the gist of your idea, lame-o - so check the correctness of the expression/idea yourself.

 

Hi all

There is a custom function bool isCloseLastPosByStop(string sy="", int op=-1, int mn=-1). The function returns 1 if stoploss is triggered and the terminal is shut down.

When restarting the terminal, the function saves this 1. What should be done to make the function return 0 when the terminal is switched on and work as planned - when closing by stoploss takes 1 and when closed by another reason 0 - please advise, if not difficult, I lack the skills to do it now.

 
KoZaNOStra >> :

>> Hi all.

There is a custom function bool isCloseLastPosByStop(string sy="", int op=-1, int mn=-1). The function returns 1 if stoploss is triggered and the terminal is shut down.

When restarting the terminal, the function saves this 1. What should be done to make the function return 0 when the terminal is switched on and work as planned - when closing by stoploss takes 1 and when closed by another reason 0 - please advise, if not difficult, I lack the skills to do it now.

Immediately after switching on the terminal, change the EA's magick.