[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 63

 
Roman.:

Good day!

"... but they forgot to think it back."

Of course, it's all the developers' fault BEFORE anything else!

Who did they make this for?




You're the one who pointed me to the conversion from string to double and back.

You don't need to convert from int to string

You just assign an int to the string

int bars = 1000;
string stroka = bars;
Print(stroka);
 
Can you tell me how to know the number of bars from the beginning of the day to the current timeframe? How do I know the number of bars from the beginning of the day to the current moment. on the current timeframe.
 
SvSerg:


You were the one who pointed me to the conversion from string to double and vice versa.

You don't need to convert from int to string

you just assign the string to the int

Either way, it's ALL the fault of the developers! :-)
 
Arles:
Could you please tell me how to find out the number of bars from the beginning of the day to the current timeframe? How to know the number of bars from the beginning of the day to the current moment. on the current timeframe.
iBarShift(NULL,0,iTime(NULL,1440,0))
 
tara:
iBarShift(NULL,0,iTime(NULL,1440,0))



Thank you!
 
Good day!!! Happy holidays to all!!! Happy New Year and Merry Christmas!



Can you give me a hint!!!I haven't used arrays before. I would like to set an array in its zero element- remember ticket one, price one. In the first element of the array- remember ticket two, price two. Etc.

How to write it? In two words... No, I generally remember the topic, I've read about arrays. Just write in one line how to set it.



And here is a part of my code, though it is unnecessary. extern int Raz=5;
int start()
{
//----
if (!PozyProstavleny){ 

Price= (Ask+Dist*Point) ; TP_BUY=(Price+TP*Point); SL_BUY= (Price- SL*Point);
Price_SELL= (Bid-Dist*Point) ; TP_SELL=Price_SELL-TP*Point; SL_SELL=Price_SELL+SL*Point; 

for(int Raz1=Raz;Raz1>0;Raz1--){

Sleep(2000); RefreshRates(); for(int A=25;A>=0;A--){if(IsTradeAllowed())break;
if(A==0) Comment(" эксперту не разрешено торговать или поток для выполнения торговых операций занят "); } 
OrderSend (Symbol( ), OP_BUYSTOP, Lot ,NormalizeDouble(Price, Digits), 5, NormalizeDouble( SL_BUY,Digits), 
NormalizeDouble( TP_BUY,Digits), NULL, 450, 0, CLR_NONE);
Price= (Price+Dist*Point) ; TP_BUY= (Price+TP*Point); SL_BUY= (Price- SL*Point);
Error=GetLastError();
if (Error!=0){ string errorcomment = "Ошибка открытия ордера байстоп " + " " + Symbol() + " " + ErrorDescript(Error); 
Print (errorcomment);}

Sleep(2000); RefreshRates(); for( A=25;A>=0;A--){if(IsTradeAllowed())break;
if(A==0) Comment(" эксперту не разрешено торговать или поток для выполнения торговых операций занят "); } 
OrderSend (Symbol( ), OP_SELLSTOP, Lot ,NormalizeDouble(Price_SELL, Digits), 5, NormalizeDouble( SL_SELL,Digits), 
NormalizeDouble( TP_SELL,Digits), NULL, 450, 0, CLR_NONE);
Price_SELL= (Price_SELL -Dist*Point) ;TP_SELL=Price_SELL-TP*Point; SL_SELL=Price_SELL+SL*Point;
Error=GetLastError();if (Error==0)

{errorcomment = "Ошибка открытия ордера селлстоп " + " " + Symbol() + " " + ErrorDescript(Error); 
Print (errorcomment);} Print ("for1");PozyProstavleny=1; 
}
} 
 
Dimka-novitsek:
Good day!!! Happy holidays to all!!! Happy new year and christmas!



A hint!!!I haven't used arrays before. I would like to set an array in its zero element- remember ticket one, price one. In the first element of the array- remember ticket two, price two. Etc.

How to write it? In two words... No, I generally remember the topic, I've read about arrays. Just write in one line how to set it.



And here is a part of my code, though it is unnecessary. extern int Raz=5;

Double Mass[Raz,2];

...

Mass[0,0] =ticket1;

Mass[0,1] =ticket1;

...

 
Thank you!!!
 

#property copyright "Copyright 2012, MetaQuotes Software Corp.
#property link "http://www.metaquotes.net"

double Mass[Raz,2];

'Raz' - integer number expected D:\TeleTRADE\experts\ VERSION_DIEMY_PREMIUM_Alex_Wearwolf.mq4 (30, 99)
'2' - variable expected D:\TeleTRADE\experts\Version_dynamic_perception_Alex_Wearwolf.mq4 (30, 103)
']' - ''''D:\TeleTRADE\experts\Version_dynamic_perception_Alex_Wearwolf.mq4 (30, 104)
']' - ']' ''D:\TeleTRADE\experts'' ''Variant_dynamic_perception_Alex_Wearwolf.mq4 (67, 12)
............. 20 errors, 0 warnings

 
It's really on a level playing field, as they say....