Questions from Beginners MQL4 MT4 MetaTrader 4 - page 165

 
Dmitry Pan:
both at the command line and with the auto key, I don't know why, it installs as a portable version for some reason....
Check uac settings
Maybe you disabled uac
 
Vladislav Andruschenko:
Check your uac settings
You may have disabled uac

THANK YOU!!! Yes account control has been disabled

 

Greetings

Trying to get data from the "arrow" indicator BiforexV1, which itself uses three other indicators. The second of them, we don't use in the settings.

Indicator parameters are taken from the tester


#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict

extern int CountBars = 100;
extern bool UseIndic1 = true;
extern bool UseIndic2 = false;
extern bool ShowShorts = true;
extern bool UseIndic3 = true;
extern int SizeArrows = 2;
extern int ShiftArrow = 5;
extern int NumSigBar = 0;
extern bool Repeating = true;
extern bool ShowAlert = 1;
extern bool SendPush = 0;
extern bool SendMailInfo = 0;
extern bool ShowSound = 0;
 
double b0; double b1; double b2; double b3; double b4; 
int OnInit(){

return(INIT_SUCCEEDED);}
void OnDeinit(const int reason){}
void OnTick(){

b0 = iCustom(NULL, 0, "BiforexV1", CountBars, UseIndic1, UseIndic2, ShowShorts, UseIndic3, SizeArrows, ShiftArrow, NumSigBar, Repeating, ShowAlert, SendPush, SendMailInfo, ShowSound, 0, 1);
b1 = iCustom(NULL, 0, "BiforexV1", CountBars, UseIndic1, UseIndic2, ShowShorts, UseIndic3, SizeArrows, ShiftArrow, NumSigBar, Repeating, ShowAlert, SendPush, SendMailInfo, ShowSound, 1, 1);
b2 = iCustom(NULL, 0, "BiforexV1", CountBars, UseIndic1, UseIndic2, ShowShorts, UseIndic3, SizeArrows, ShiftArrow, NumSigBar, Repeating, ShowAlert, SendPush, SendMailInfo, ShowSound, 2, 1);
b3 = iCustom(NULL, 0, "BiforexV1", CountBars, UseIndic1, UseIndic2, ShowShorts, UseIndic3, SizeArrows, ShiftArrow, NumSigBar, Repeating, ShowAlert, SendPush, SendMailInfo, ShowSound, 3, 1);
b4 = iCustom(NULL, 0, "BiforexV1", CountBars, UseIndic1, UseIndic2, ShowShorts, UseIndic3, SizeArrows, ShiftArrow, NumSigBar, Repeating, ShowAlert, SendPush, SendMailInfo, ShowSound, 4, 1);

Print(b0, "  ", b1, "  ", b2, "  ", b3, "  ", b4);

But it writes zero and there is no indicator on the chart at test stop. When trying to connect it to the chart after a few seconds it writes


Files:
Biforex.zip  615 kb
 
Andrey Sokolov:

Greetings

Trying to get data from the "arrow" indicator BiforexV1, which itself uses three other indicators. The second of them, we don't use in the settings.

Indicator parameters are taken from the tester


But it writes zero and there is no indicator on the chart at test stop. When I try to connect it to the chart after a few seconds it writes


Happy to help the girl. Try not setting parameters, they will take the default from the indicator and see the result. But most likely it is the high consumption of resources by the indicator itself, and you call it 5 times

b0 = iCustom(NULL, 0, "BiforexV1", 0, 1);
 
Vitaly Muzichenko:

Glad to have helped the girl. Try not to set the parameters, they are taken by default from the indicator, and see the result. But most likely it is the high consumption of resources by the indicator itself, and you call it 5 times.

Thank you for not getting past it. The default settings are not suitable as you need to disable the second of three other indicators used by this indicator, the indicator will not give signals in this case. If you set only this parameter, the following error is displayed

BiforexV1 USDCHF,H1: array out of range in 'BiforexV1.mq4' (213,19).

I tried to use another solution through the parameters of graphical objects, can you tell me how to do it?

I asked in a neighboring thread.

I have arrows on the chart, but I don't see them in the object list menu and EA that reads objects on the chart also writes 0. How is it done and how do I access their parameters?



Любые вопросы новичков по MQL4, помощь и обсуждение по алгоритмам и кодам
Любые вопросы новичков по MQL4, помощь и обсуждение по алгоритмам и кодам
  • 2019.01.11
  • www.mql5.com
В этой ветке я хочу начать свою помощь тем, кто действительно хочет разобраться и научиться программированию на новом MQL4 и желает легко перейти н...
 
Andrey Sokolov:

Thank you for not passing by. The default parameters are not suitable as the second of the three other indicators used by this indicator should be disabled, with this option the indicator does not give signals. If you set only this parameter, the following error is displayed

BiforexV1 USDCHF,H1: array out of range in 'BiforexV1.mq4' (213,19).

I tried to use another solution through the parameters of graphical objects, can you tell me how to do it?

I asked in a neighboring thread.

I have arrows on the chart, but I don't see them in the object list menu and the Expert Advisor that displays objects on the chart also writes 0. How is it done and how do I access their parameters?

The arrows draw the indicator buffers, so it is not a "graphical object".

According to the settings there is nothing more to be done, apparently, the problem isin the high consumption of resources by the indicator itself, and you call it 5 times


 
Vitaly Muzichenko:

The arrows draw the indicator buffers, so it is not a "graphical object".

There is nothing more to be done by the settings then, probably the problem isin the high consumption of resources by the indicator itself, and you call it 5 times


This is an error when you call it once.
At the same time, when trying to specify one or more parameters, errors are reported and no indicator is drawn on the chart after the tester is stopped
 
Andrey Sokolov:
This is an error when calling it once.
At the same time, when you try to specify some or more parameters, it writes errors and after stopping the tester, the indicator is not drawn on the chart.

Maybe you are entering a wrong type, in the indicator it is int, while you are writing a bool. Reconsider carefully

P.S. I had a case, sat with it for half a day, if I had been drinking, I drank probably during this time bottles 5-7 beer)

Some asshole in an indicator prescribed timeframe in the string: "input string tf = PERIOD_H4", but I prescribed it properly: iCustom(NULL, 0, PERIOD_H4, 0, 1);

As a result, the test was unrealistically long and without any signals. It turned out I should have prescribed it in the following way:iCustom(NULL,0," PERIOD_H4",0,1); and the problem was solved

 
Vitaly Muzichenko:

Maybe you are entering the wrong type, in the indicator it is int, in you write bool. Please reconsider carefully.

There is no error here, if it is at all possible to pass one or not all parameters.

 
Andrey Sokolov:
At the same time, when trying to specify some or more parameters, they write errors and after stopping the tester there is no drawing of the indicator on the chart

How do they draw arrows without graphical objects?

Reason: