Questions from a "dummy" - page 264

 
Silent:

First of all, the chances are slim to none (Urain's code has never failed).

Secondly, I have an error (and no object created) on the first call.

I think you are passing wrong parameters to your function, which is what is causing the error, it should be written in the error.
 
Silent:

I get error 5040 (Corrupted parameter of type string) the first time I call an object creation function

I call it like this

if(hlp_var==high_low)
     {
      //CreateTL(nTL,dt[0],pr[0],dt[0],pr[1],false,false,nTL_color);
      CreateTL(nTL,dt[0],pr[0],dt[0],pr[1],false,false,nTL_color);
      CreateTL(nTLe,dt[1],pr[0],dt[1],pr[1],false,false,nTL_color);
      CreateTL(nTLh,dt[0],pr[0],dt[1],pr[0],false,true,nTL_color);
      CreateTL(nTLl,dt[0],pr[1],dt[1],pr[1],false,true,nTL_color);
      CreateTL(nTL,dt[0],pr[0],dt[1],pr[1],false,true,nTL_color);
      CreateTL(nTL,dt[0],pr[1],dt[1],pr[0],false,true,nTL_color);
      Print("CreateTL GetLastError "+IntegerToString(GetLastError()));
     };

Could you tell me where the error is?

Wait, you call the CreateTL function with the nTL string three times. Therefore, on the 2nd and 3rd calls it tries to create an object using the name of an already existing object.

 
Contender:

Wait, you call the CreateTL function with the string nTL three times. Therefore, on the 2nd and 3rd calls it tries to create an object with the name of an existing object.

The name is generated each time.

nTL="nTL_"+IntegerToString(MathRand());

The first call doesn't work.

Second, third, tenth - then everything works

(so about, and there are dozens of these functions)

void  Create_33()
  {
   CreateTL(nTL,dt[2],pr[0],dt[2],pr[1],false,false,nTL_color);
   CreateTL(nTL,dt[0],pr[2],dt[1],pr[2],false,true,nTL_color);
   CreateTL(nTL,dt[0],pr[0],dt[1],pr[2],false,true,nTL_color);
   CreateTL(nTL,dt[0],pr[0],dt[2],pr[1],false,false,nTL_color);
   CreateTL(nTL,dt[2],pr[0],dt[1],pr[2],false,true,nTL_color);
   CreateTL(nTL,dt[2],pr[0],dt[1],pr[1],false,true,nTL_color);
   CreateTL(nTL,dt[2],pr[1],dt[1],pr[0],false,true,nTL_color);
   CreateTL(nTL,dt[2],pr[1],dt[1],pr[2],false,true,nTL_color);
   CreateTL(nTL,dt[0],pr[1],dt[2],pr[0],false,false,nTL_color);
   CreateTL(nTL,dt[0],pr[1],dt[1],pr[2],false,true,nTL_color);
   CreateTL(nTL,dt[0],pr[2],dt[1],pr[0],false,true,nTL_color);
   CreateTL(nTL,dt[0],pr[2],dt[1],pr[1],false,true,nTL_color);
  };
 
Silent:

The name is generated every time

The first call doesn't work.

Second, third, tenth - then everything works

(so about, and there are dozens of these functions)

Error in the name for the first time.
 
Silent:

The name is generated every time

The first call doesn't work.

Second, third, tenth - then everything works

(so about, and there are dozens of these functions)

:))))

I got it. This is the first time you've tried to create an object with an empty name!

 

Hmm. So, it's generated in the function for the next call?

Oh, man, that's retarded. It took me three nights to figure it out.

Thank you all, I'll think of something.

 

Is it possible to print to a file during a test?

The Comment and Printfunctions work, but printing to a file does not. For debugging purposes I really need it.

Документация по MQL5: Общие функции / Comment
Документация по MQL5: Общие функции / Comment
  • www.mql5.com
Общие функции / Comment - Документация по MQL5
 
Hello all, could you please tell me how to unsubscribe from a trading signal?
 

Here is a thread - Frequently Asked Questions about the Signals service:

Can I unsubscribe from the Signal in the same way I subscribed to it. You can cancel the Signal subscription in My Subscriptions on https://www.mql5.com/en/signals or directly in the terminal: see MetaTrader 5 Help → User Interface → Toolbox → Signals: Unsubscribe from Signal. If you unsubscribe from a fee-based Signal, the amount blocked in your account for payment of the subscription fee will be deducted from your account upon canceling the subscription.

========

I'll look it up in Russian.

Trading signals
Trading signals
  • www.mql5.com
Trading Signals for MetaTrader: social trading, mirror trading, copy trading and account monitoring
 

Here is the FAQ on the Signals service:

  1. Do I have to cancel my Signal subscription at the same place I signed up for it?
    You can unsubscribe to a Signal either online at https://www.mql5.com/ru/signals in section "My Subscriptions" or directly from the terminal: see MetaTrader 5 Help → User Interface → Tools → Signals: Unsubscribe from a Signal. If you have a paid subscription, the reserved subscription amount will be charged to your account when you unsubscribe as payment.

  2. How do I know which Signal I am subscribed to in the terminal and how can I cancel my subscription?
    First, when you connect to your account, the terminal communicates with the Signal Server and checks for available subscriptions. If the account has a subscription to the Signal, it will show this message in the Journal. Besides, in the terminal settings, in the Signals section, the name of the Signal to which this account is subscribed is displayed first in blue.
    Second, there is a simple way to immediately see all your current and completed subscriptions on the Signals page under My Subscriptions. In order to do so, you should previously log in to MQL5.com.

Торговые сигналы
Торговые сигналы
  • www.mql5.com
Торговые Сигналы для MetaTrader: копирование сделок, мониторинг счета, автоматическое исполнение сигналов и социальный трейдинг
Reason: