[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 528

 
Zhunko and granit77 thanks.

I have another seemingly simple question. I have a five-digit number on EURUSD, how do I get the Close[1] price accurate to 5 decimal places? I did it like this:

double close1=NormalizeDouble (Close[1],Digits);
Print ("close1= ", close1);
The printout says for example: close1= 1.3124 This is not what I need.

And does the same work with indicators like:

double nma=iMA(Symbol(), 0, periodMA, 0, mamethod, appliedprice, 1);
double ma=NormalizeDouble(nma, Digits);
 
Neelan:
Zhunko and granit77 thanks.

I have another seemingly simple question. I have a five-digit number on EURUSD, how do I get the Close[1] price accurate to 5 decimal places? I did it like this:

In the printout it says for example: close1= 1.3124 It's not what I need.
double close1=NormalizeDouble (Close[1],Digits);
Print ("close1= ", DoubleToStr(close1, Digits));
 
Neelan:
Zhunko and granit77 thanks.

I have another seemingly simple question. I have a five-digit number on EURUSD, how do I get the Close[1] price accurate to 5 decimal places? I did it like this:

The printout says that for example: close1= 1.3124 It's not what I need.

And does the same work with indicators like:



double close1=NormalizeDouble (Close[1],Digits);
Print ("close1= ", DoubleToStr(close1,Digits));
 
Vinin:

Slipage to increase and prices to normalise

Thank you! Only how to do it?
 
Vinin:

Slipage to increase and prices to normalise

Thank you! Only how to do it?
 
Reshetov:
The first thing to do is to look at the logbook: it is where the EA leaves the error messages. And then, according to these errors, you will figure out what is wrong and why. And it is desirable that you learn to analyse yourself, rather than dumping bales of code here in the hope that others will do the same for you.

Don't judge too severely, I am very slow in programming. I tried to understand it for a week, and then I accidentally came across this forum and thought it would help me, but I was punched in the throat.
 
Skopcheny:
I need to implement return of composite result from values of several types with this function, can you suggest the best way to do it? Or should I just use global variables for values of this function?


Use return function(int &var1, double &var2, string &var3) parameters: this is certainly not good (in terms of code writing correctness), but it solves the problem.

 

Can you please clarify the rules of semantics - is it right, or both? Okay, I think it's both right and wrong.

 OrderSend(Symbol(),

 ticket=OrderSend(Symbol(),O
 
Looking for a history breakeven code. maybe someone has one. please share.
I have a Breakeven code, but it's based on open orders.
I have a good working order when there is a loss on an order and it should open when the order reaches the break-even point. The orders have already seen the zero line on the profit line on the chart taking into account the previous losses. The Expert Advisor does not have a stop loss, which means that a losing trade will not be closed by a stop loss.
 
Reshetov:
The first thing to do is to look in the logbook: the EA leaves error messages there. And then you have to sort out what and why according to these messages. And it is desirable that you yourself learn to analyze, rather than throwing out here bundles of code in the hope that others will do the same for you.


I took a look at the magazine.

That seems to be the reason, but I don't know what it means. Can anyone explain? And how to fix it?

Reason: