[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 274

 
AndCam:

Why isn't the event log and EA saved?

I open the relevant folders in the terminal folder and it is empty....

What could be the problem?


So no one can help me with advice?
 
AndCam:

So no one can help me with advice?
The logs are fully retained after the terminal is unloaded.
 
Zhunko:
Logs are completely saved after you unload the terminal.


What do you mean?

I'm not saving any files at all.

How do I unload the terminal to get the logs?

 
Carried.

geha 25.03.2011 13:24

I am a beginner. Help me to understand what error and how to correct it? (Otd tisk EURUUSD30 1.41590/1.41610)

Europa 25.03.2011 13:47
 

Dear Professionals, please advise... In addition to the line of the indicator itself, I use horizontal lines in the indicator. I want to set the colour of horizontal lines with the same parameter as the indicator line. However, an attempt to change ObjectSet (Sname, OBJPROP_COLOR, Silver); to ObjectSet (Sname, OBJPROP_COLOR, indicator_color1); does not work. What am I doing wrong? Thanks...

 
kon12:

Dear Professionals, please advise... In addition to the indicator line, I use horizontal lines in the indicator. I want to set the colour of horizontal lines with the same parameter as the indicator line. However, an attempt to change ObjectSet (Sname, OBJPROP_COLOR, Silver); to ObjectSet (Sname, OBJPROP_COLOR, indicator_color1); does not work. What am I doing wrong? Thanks...


Colour should be in external variables - via extern
 

Please tell me how to find the difference between close prices of neighbouring bars in pips (five digits).

For example Close[n-1]-Close[n]=0.0006 (i.e. 6 points), in theory I should just multiply by 10000, but there are pairs (eurjpy) where the same calculation will give Close[n-1]-Close[n]=0.11 (i.e. 11 points), and I need to multiply by 100.

Will I have to create a separate function that will check the number of decimal places and return 100, 1000, 10000 depending on the result of this check?

Maybe someone has such a function ready?

 
Sergey_Rogozin:

It makes no sense to normalize the double values to compare them, because the two values 1.778946 and 1.778949 will be equal after normalization, and this is already incorrect, because the first value is smaller than the second one.

Normalize double is only needed to send a command to the Dealer, but not for "internal consumption" - comparison of the two values.

Once I had calculated the same way but faced a problem of comparing double values in the function of accounting for orders which did not want to work properly for a fortnight and did not see orders according to their parameters. I had written about 15 order accounting versions but none of them worked. So I decided to normalize the data when comparing them and compare not by comparison but by subtracting one from the other and if equal, consider the comparison == true. Everything worked. All 15 draft versions of order accounting.
Now I always do this comparison and don't have problems with strange behavior of functions which should work but don't ... And I save time searching for ridiculous errors...
 
Neofit:

Please tell me how to find the difference between close prices of neighbouring bars in pips (five digits).

For example Close[n-1]-Close[n]=0.0006 (i.e. 6 points), in theory I should just multiply by 10000, but there are pairs (e.g. eurjpy) where the same calculation will give Close[n-1]-Close[n]=0.11 (i.e. 11 points), and I need to multiply by 100.

Will I have to create a separate function that will check the number of decimal places and return 100, 1000, 10000 depending on the result of this check?

Maybe one has such a function ready?

double pt=MarketInfo(Symbol(), MODE_POINT);

difference=(Close[n-1]-Close[n])/pt;

Instead of Symbol(), substitute the symbol name, e.g. "EURUSD" or "EURJPY" if you want to receive data for another symbol from an EA working with one symbol. Alternatively, leave Symbol() or NULL and the EA will always take data from the instrument on which it works.

 
Neofit:

Please tell me how to find the difference between close prices of neighbouring bars in pips (five digits).

For example Close[n-1]-Close[n]=0.0006 (i.e. 6 points), in theory I should just multiply by 10000, but there are pairs (e.g. eurjpy) where the same calculation will give Close[n-1]-Close[n]=0.11 (i.e. 11 points), and I need to multiply by 100.

Will I have to create a separate function that will check the number of decimal places and return 100, 1000, 10000 depending on the result of this check?

Maybe someone has such a function ready?


(Close[n-1]-Close[n])/Point/10; get in standard points, without /10 in five-digit points.
Reason: