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

 

Hint:

I have two variables (SLS and SLB) that I want to see on the screen (through the use of LABEL) . I got it this way:

   string Text = "SL Short: ",DoubleToStr(SLS,Digits),"\n","SL Long: ",DoubleToStr(SLB,Digits);
   
   ObjectCreate("Label_SL", OBJ_LABEL, 0, 0, 0);// Создание объ.
   ObjectSet("Label_SL", OBJPROP_CORNER, 1);    // Привязка угол
   ObjectSet("Label_SL", OBJPROP_XDISTANCE, 10);// Координата Х
   ObjectSet("Label_SL", OBJPROP_YDISTANCE, 15);// Координата Y
   ObjectSetText("Label_SL",Text,10,"Arial",Black);

Unfortunately, the compiler swears: 'DoubleToStr' - variable expected........

What should I do?

 
Azerus:

Hint:

I have two variables (SLS and SLB) that I want to see on the screen (through the use of LABEL) . I got it this way:

Unfortunately, the compiler swears: 'DoubleToStr' - variable expected........


Are you sure you have

double SLS, SLB;

and the variable is available in this context, plus I was doing the string concatenation with +

string Text = "SL Short: "+DoubleToStr(SLS,Digits)+"\n"+"SL Long: "+DoubleToStr(SLB,Digits);
 
Azerus:

Hint:

I have two variables (SLS and SLB) that I want to see on the screen (through the use of LABEL) . I got it this way:

Unfortunately, the compiler swears: 'DoubleToStr' - variable expected........

What should I do?



string Text = StringConcatenate("SL Short: ",DoubleToStr(SLS,Digits),"\n","SL Long: ",DoubleToStr(SLB,Digits));
 
splxgf, PapaYozh


Pluses fixed everything, as did StringConcatenate thank you very much.....

But the lines don't transfer..... I take it you have to do two LABEL's for this (one for my SLS and one for the SLB)?

 

Hello!

I should say right away that I'm not familiar at all with MQL and only have an abstract idea of its goals and possibilities. The ultimate goal is to automatically obtain the complete account history (my orders, profits from agents), and use it to do something with external programs (in my case - in Java).

Do I understand correctly that I can do it like this:
- Using some sort of timer in MQL, I upload the account history every 15 minutes and save it to a file on disk

- I can use a third party program to pick up these files and do what I want with them.

It seems to me that the issue of unloading and saving the history is quite a trivial and frequent task. If you could share an example tip on how to do it, or at least which part of the documentation to look at, I would be very grateful.

Thanks in advance!

 
Azerus:

Pluses fixed everything, as did StringConcatenate thank you very much.....

But the lines don't transfer..... I take it you have to make two LABEL's for this (one for my SLS and one for the SLB)?

well, if replacing "/n" with CharToStr(13)+CharToStr(10) doesn't help, then two LABELs.
 
Sorry for the off-topic question! Where can I get an archive of quotes from a real account of a pair, not from a demo, EURUSD, M1 from Alpari. ru for 20 or maybe 10 years. I tried to load them through the terminal but the bars in the history have become even less. Please, tell me who knows! Or a link to L.C. to download it! Thanks in advance.
 
kolyango:
Sorry for the off-topic question! Where can I get an archive of quotes from a real account of a pair, not from a demo, EURUSD, M1 from Alpari. ru for 20 or maybe 10 years. I tried to load it through the terminal but the bars in the history have become even less. Please, tell me who knows! Or a link to L.C. to download it! Thanks in advance.

Contact their technical support - by phone or by letter... :-) There minutes, if there will be from 2009, it's good... :-)
 

Hello again everyone!

I had the task of automatically unloading and saving the account history. As I have already understood, for this purpose I need to use an Expert Advisor, which will either unload the history on every tick or save it in a file a bit less frequently.

Everything is simple and understandable with creation and start-up of the Expert Advisor. The process of saving files is also clear: there are a lot of examples. But I still cannot find examples of the account history, any method that would return the list of orders related to this account. For some reason I haven't found such possibilities in the "Account info" section. Perhaps someone can tell me how/where the account history is unloaded?

I hope for help and hints)

 
Already realised that I was looking in the wrong place, that the order history refers to trades. Nevertheless, it is still not clear how to upload orders... And it is not clear how to distinguish between orders directly linked to the current account and orders which have made a profit through referrals.
Reason: