Errors, bugs, questions - page 1010 1...100310041005100610071008100910101011101210131014101510161017...3193 New comment Vasiliy Smirnov 2013.07.03 18:33 #10091 tol64:I thought the answer to this question was yes. You select the ticket from the trade history, and you try to get the property from the order history. They are different lists.P.S. And there is an article with examples: MQL5 Recipes - Trade History and Library of Functions for Getting Position Properties I thought orders were divided into 2 parts and there are 3. Thank you, you are explaining it better) Nikolai Karetnikov 2013.07.03 20:52 #10092 Good day!Please tell me the way to get the bar number on the chart with datetime.Thank you!I don't want to search for bars and compare times :) Vasiliy Smirnov 2013.07.03 20:59 #10093 ns_k: Good day!Please tell me the way to get the bar number on the chart with datetime.Thank you!I don't want to search for bars and compare times :)//iBarShift int iBarShiftMQL4(string _symbol,int tf,datetime time,bool exact=false){ if(time<0) return(-1); ENUM_TIMEFRAMES timeframe=TFMigrate(tf); datetime Arr[],time1; CopyTime(Symbol(),timeframe,0,1,Arr); time1=Arr[0]; if(CopyTime(_symbol,timeframe,time,time1,Arr)>0) { if(ArraySize(Arr)>2) return(ArraySize(Arr)-1); if(time<time1) return(1); else return(0); } else return(-1); } //тф ENUM_TIMEFRAMES TFMigrate(int tf){ switch(tf) { case 0: return(PERIOD_CURRENT); case 1: return(PERIOD_M1); case 5: return(PERIOD_M5); case 15: return(PERIOD_M15); case 30: return(PERIOD_M30); case 60: return(PERIOD_H1); case 240: return(PERIOD_H4); case 1440: return(PERIOD_D1); case 10080: return(PERIOD_W1); case 43200: return(PERIOD_MN1); case 2: return(PERIOD_M2); case 3: return(PERIOD_M3); case 4: return(PERIOD_M4); case 6: return(PERIOD_M6); case 10: return(PERIOD_M10); case 12: return(PERIOD_M12); case 20: return(PERIOD_M20); case 16385: return(PERIOD_H1); case 16386: return(PERIOD_H2); case 16387: return(PERIOD_H3); case 16388: return(PERIOD_H4); case 16390: return(PERIOD_H6); case 16392: return(PERIOD_H8); case 16396: return(PERIOD_H12); case 16408: return(PERIOD_D1); case 32769: return(PERIOD_W1); case 49153: return(PERIOD_MN1); default: return(PERIOD_CURRENT); }} Anatoli Kazharski 2013.07.03 21:02 #10094 ns_k: Good day!Please tell me the way to get the bar number on the chart with datetime.Thank you!I don't want to search for bars and compare times :) Using the Bars() function. Konstantin Gruzdev 2013.07.03 21:03 #10095 ns_k: Good day!Please tell me the way to get the bar number on the chart with datetime.Thank you!I don't want to search for bars and compare times :) You can use Bars(), second type of call. Документация по MQL5: Доступ к таймсериям и индикаторам / Bars www.mql5.com Доступ к таймсериям и индикаторам / Bars - Документация по MQL5 Nikolai Karetnikov 2013.07.03 21:05 #10096 Lizar: You can use Bars(), the second type of call. Thank you all very much!!! Andrew Petras 2013.07.04 00:55 #10097 ns_k: Good day!Can you please tell me the way to get the bar number on the chart with datetime.Thank you!I don't want to search for bars and compare times :)ArraySetAsSeriesInvert the array, you will get the bar number. Nikolai Karetnikov 2013.07.04 20:44 #10098 Silent: flip the array over, there will be a bar number. I don't get it. The method suggested above helped me out. I don't understand this one. What is the point? Vasiliy Smirnov 2013.07.04 20:47 #10099 ns_k: I don't understand something. The method suggested above helped me out. But I can't get into this one. What is the point? The last element will be number 0. Andrew Petras 2013.07.05 11:56 #10100 ns_k: I don't understand it. The above method helped me out. I still don't "get" this one. What is the point?datetime is already thereArraySize - number of bars, ArraySize-1 - last bar, ArraySetAsSeries sets direction of indexing, and cell number = bar, left or right.There verification script molded. 1...100310041005100610071008100910101011101210131014101510161017...3193 New comment
I thought the answer to this question was yes. You select the ticket from the trade history, and you try to get the property from the order history. They are different lists.
P.S. And there is an article with examples: MQL5 Recipes - Trade History and Library of Functions for Getting Position Properties
Good day!
Please tell me the way to get the bar number on the chart with datetime.
Thank you!
I don't want to search for bars and compare times :)
Good day!
Please tell me the way to get the bar number on the chart with datetime.
Thank you!
I don't want to search for bars and compare times :)
Good day!
Please tell me the way to get the bar number on the chart with datetime.
Thank you!
I don't want to search for bars and compare times :)
Good day!
Please tell me the way to get the bar number on the chart with datetime.
Thank you!
I don't want to search for bars and compare times :)
You can use Bars(), the second type of call.
Good day!
Can you please tell me the way to get the bar number on the chart with datetime.
Thank you!
I don't want to search for bars and compare times :)
ArraySetAsSeriesInvert the array, you will get the bar number.
flip the array over, there will be a bar number.
I don't understand something. The method suggested above helped me out. But I can't get into this one. What is the point?
I don't understand it. The above method helped me out. I still don't "get" this one. What is the point?
datetime is already there
ArraySize - number of bars, ArraySize-1 - last bar, ArraySetAsSeries sets direction of indexing, and cell number = bar, left or right.
There verification script molded.