Questions from Beginners MQL5 MT5 MetaTrader 5 - page 457

 

2015.10.10 14:27:30.303 Tester register MQL5.community account and use MQL5 Cloud Network to speed up optimizations.

I can't test the robot with visualization. Have I got it right, the terminal asks to use cloud calculations? How to fix it?

 

Здравствуйте! 2015.10.11_11:45МСК. Compiler gives 0 errors, 0

warnings. And in the strategy tester, in the visualisation window, the chart is moving, but the

EA does not open trades. I do not see any errors in the program code.

Can you tell us what is wrong? Why does the EA does not trade? I attach three

.mq5, ex5 and .log . 11:51AMSC.

Files:
Sovetnik.mq5  16 kb
Sovetnik.ex5  11 kb
20151011.log  6 kb
 
There are several charts open in the terminal.
One of the charts(PERIOD_H4) has an EA and draws lines on another chart (PERIOD_M1).
How can I delete lines which were drawn on another chart (PERIOD_M1) when removing an EA from a chart (PERIOD_H4)?
int deinit()
   {
    for(int i= ObjectsTotal(ChartID__M1, 0, -1); i>=0; i--) 
        {
         string label = ObjectName(i);
         if(StringSubstr(label, 0,  4) == "Line")
         ObjectDelete(ChartID__M1, label);   
        }
   }

OK, it's not working.

 
Leo59:
There are several charts open in the terminal.
One of the charts(PERIOD_H4) has an EA and draws lines on another chart (PERIOD_M1).
How can I delete lines which were drawn on another chart (PERIOD_M1) when removing an EA from a chart (PERIOD_H4)?

OK, it's not working.

Delete objects with the same prefix, through the second form of call https://www.mql5.com/ru/docs/objects/objectdeleteall
Документация по MQL5: Графические объекты / ObjectsDeleteAll
Документация по MQL5: Графические объекты / ObjectsDeleteAll
  • www.mql5.com
Графические объекты / ObjectsDeleteAll - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Karputov Vladimir:
Remove objects with the same prefix, through the second form of call https://www.mql5.com/ru/docs/objects/objectdeleteall
A HUGE THANK YOU, Vladimir, for your prompt and expert reply!!!
Now, everything works.
THANK YOU !!!!
 

Hello. I've been familiar with mql5 for a couple of days, before that I was using TsLab. Following the example I made an EA with 2 internal iMA indicators. I have 2 handles and iMA function. Everything works.

Can I ask you something)
1. How can I change the colour of internal indicator in an EA? In a standalone indicator, you specify the properties of the buffer you want and its colour, but what about in the built-in indicator?

2. How to display not only sliders, but also stop and take profit on a chart in the EA.

 
Fresto:

Hello. I've been familiar with mql5 for a couple of days, before that I was using TsLab. Following the example I made an EA with 2 internal iMA indicators. I have 2 handles and iMA function. Everything works.

Can I ask you something)
1. How can I change the colour of an indicator in an EA? In a standalone indicator, you specify the properties of the buffer you want and its colour, but what about in the built-in indicator?

2. How to display not only sliders, but also stop and take profit on a chart in a test.

  1. What do you mean by "built-in indicator"?
    a) If we meaniCustom, in this case, you get data of indicator buffers in your Expert Advisor, that is, the indicator is not displayed on the chart, and therefore the indicator colour is up to the light.
    b) Exception: the colour of indicator constructions depends on indicator buffer values - in this case see par. 1.а.
  2. Clarify. Since "moving averages" are, as I understand it, Moving Averages, and Stop Loss and Take Profit are position properties.
 

Hello.


There is a custom indicator. As a result an array of values (one line) and a chart (line). Can you please tell me how to get only the values of the array of values in my EA.

I want to use the indicator for chart drawing to see what it draws. And I will continue working with values.

 
kashi_ann:

Hello.


There is a custom indicator. As a result an array of values (one line) and a chart (line). Can you please tell me how to get only the values of the array of values in my EA.

I want to use the indicator for chart drawing to see what it draws. And I will continue working with values.

UseiCustom to get indicator handle.
 
kashi_ann:

Hello.


There is a custom indicator. As a result an array of values (one line) and a chart (line). Can you please tell me how to get only the values of the array of values in my EA.

I want to use the indicator for chart drawing to see what it draws. And I will continue working with values.

In order to see "what it draws", put this indicator with the same parameters in the same Expert Advisor window.

To get the values of the array use the function CopyBuffer.

Reason: