Questions from Beginners MQL5 MT5 MetaTrader 5 - page 273

 

Good day to all. Has anyone dealt with the display of indicators during testing in visual mode? Is it possible to hide them during testing? I really want to see how the trawl works, but because of the great amount of indicators the visualization chart is very small and I have to stop and manually minimize all indicator windows during each test. The documentation of https://www.mql5.com/ru/docs/runtime/testing#indicatorrelease says that

Для того чтобы запретить показ индикатора на графике после завершения одиночного тестирования, используйте функцию IndicatorRelease() в обработчике OnDeinit().

I cannot find information about how to hide indicators during testing.

Документация по MQL5: Программы MQL5 / Тестирование торговых стратегий
Документация по MQL5: Программы MQL5 / Тестирование торговых стратегий
  • www.mql5.com
Программы MQL5 / Тестирование торговых стратегий - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
jommerbot:


But I haven't found any information about what to do if you want to hide the indicators during testing.

This is because there isn't any.

https://www.mql5.com/ru/search#!keyword=HideTestIndicators

 

Can you tell me if a broker can tell if a trader or a robot is trading (MT4)? Earlier it seemed that it couldn't, but now? There is just a condition in one of the traders' competitions:

1.4 Competition is a competition between traders. Therefore, in particular, automated strategies that do not involve a human (trader) to make a decision based on the current market situation are not allowed.


If I use an Expert Advisor, will they burn me or not?)

I asked their manager, he avoided answering how they can determine who is trading.

 
Crucian:

Can you tell me if a broker can tell if a trader or a robot is trading (MT4)? Earlier it seemed that it couldn't, but now? There is just a condition in one of the traders' competitions:

If I use an Expert Advisor, will they burn me or not?)

Asked their manager, he's avoiding answering how they can tell who's trading.

I've seen such conditions on contests. The broker may block the auto-trading function in the platform and the EA may just not start for you.
 
papaklass:

Of course he can.

If he couldn't, he wouldn't be writing. :)

There is only one way to tell if an order is placed by an EA - a non-zero magic number.
 
stringo:
There is only one way to tell if an order is placed by an EA - a non-zero magic number.

And if I have a magician in the EA:

int mag=NULL;

no one at the DC will be able to determine that it is an EA?

 
rosomah:

And if I have a magician in my EAs:

int mag=NULL;

no one in the brokerage company will even recognize it as an EA?

Probably should be set int mag != NULL; (not equal to 0).

And what mag should be assigned to the order?

Any? That would also be a mess.

 
Crucian:

Probably have to put int mag != NULL; (not equal to 0).

And what mag should be assigned to the order?

Any? That would also be a nonsense.

int mag != NULL; -this way will not compile in the tester.

int mag = NULL; -this way easily goes. If we check it through the alert it will return "0".

int mag = EMPTY_VALUE; -this works too. Here it returns"-2147483648".

Alert("mag=",mag);

Now I have tested it in the tester at MQL4 and MQL5. It works in the tester.

As for the real code, the question what should we do so that a brokerage company would not feel the Expert Advisor, at least according to incoming parameters, remains open for me. Of course, we can do it without partial orders.

 
rosomah:

int mag != NULL; -it does not compile in the tester.

int mag = NULL; -it works easily. If you check it with the alerts it will return "0".

int mag = EMPTY_VALUE; -this works too. Here it returns"-2147483648".

Alert("mag=",mag);

Now I have tried it in the tester in MQL4 and MQL5. In the tester it goes.

As for the real code, the question what should we do so that a brokerage company would not feel the Expert Advisor, at least according to incoming parameters, remains open for me. Of course, we can do it without using orders.

NULL is a special identifier used when working with reference types (pointers to objects). Integer (int) is a significant type. The significant types cannot refer to anything, in particular to NULL identifier, they can only be passed by reference. Therefore, the comparison of a significant type to a reference type is incorrect. Also, it is impossible to equate a meaningful type with a reference type. The reason why this code is compilable is because the compiler implicitly converts NULL to a meaningful type "0" and then equates variable mag to it. The only true solution is to simply compare magic number of an order or trade with zero. If this value is different from zero, we can conclude that this order has been placed by the EA:

ulong magic = HistoryOrderGetInteger(order_id, ORDER_MAGIC);

if(magic != 0)

   printf("Ордер выставлен экспертом");

else

   printf(Ордер выставлен вручную); 

 

where do I start?!?! I've only just signed up

Reason: