Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1595

 
MakarFX:

Can you tell me how to output this to an external variable

into a string and then parse the string

input string fibo_levels0="0 23.6 38.2 50 61.8 76.4 100"; //Fibo levels (separated by a space or semicolon)
 
MakarFX:

Please advise how to output this to an external variable

Write the values into the input string

Then split by a delimiter into an array

stringsplit

Like this

string NameSymb="EURCAD,USDCAD,EURUSD,AUDCAD,EURNZD,NZDUSD,AUDUSD,#CAT";

 string FillSymb[];
 CountSymbol=StringSplit(NameSymb,',',FillSymb);
Документация по MQL5: Строковые функции / StringSplit
Документация по MQL5: Строковые функции / StringSplit
  • www.mql5.com
StringSplit - Строковые функции - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Taras Slobodyanik:

into a string and then parse the string

What do you mean, parse?

 
MakarFX:

What does it mean to parse?

From parse - to parse, to analyse.

Remove extra spaces left-right, replace commas with full stops, replace semicolons with spaces, remove triple-double spaces... split into an array, convert to double what can be converted and what cannot be converted into a log)

 
Vitaly Muzichenko
Taras Slobodyanik:

Thank you, I get the gist)

I'll try it...

 
MakarFX:

These are the conditions for starting an EA, if( if) (CountOrders()==0( no orders )&&ObjectGetInteger(0, "lab_Button",OBJPROP_STATE))( and the button is pressed), then you can trade

Thank you. I am slowly figuring it out.

Please clarify the relationship between: datetime Start; -in the area of global variables and Start = iTime(_Symbol,PERIOD_D1,0); -within void OnTick()?

Or these things are not related?

 
законопослушный гражданин:

Thank you. I am slowly getting to the bottom of this.

please clarify the relationship between: datetime Start; -in the area of global variables and Start = iTime(_Symbol,PERIOD_D1,0); -within void OnTick()?

Or these things are not related?

In the global variables area there is a variable declaration

within void OnTick() and other functions - use of variables

 
MakarFX:

in the global variable area, variables are declared

within void OnTick() and other functions - variables are used

thanks

 
MakarFX:

Thanks, I really needed to rewrite it a bit, but your idea worked,


I cannot solve one problem, I can close a position at 19:59, but after 20:00 the EA does not accept and does not close positions

 
Eugen8519:

Thanks, I really needed to rewrite it a bit, but your idea worked,


I cannot solve one problem, I can close a position at 19:59, but after 20:00 the EA does not accept and does not close positions

need to see the code