Now you need to find the maximum price in this time range. I can find the maximum price:
but I can't tie it to the time range. Can you tell me how to do it?
I've built it up, but haven't tested it yet. It seems to work
int start(){
int StartHour=8,StartMinute=1;// Время 08:01int StopHour=23,StopMinute=58; // Время 23:58int StartTime=StartHour*60+StartMinute;
int StopTime=StopHour*60+StopMinute;
int CurrentMinutesFromDayStart=Hour()*60+Minute();// Текущее время в минутах от начала дняif(CurrentMinutesFromDayStart>=StartTime && CurrentMinutesFromDayStart<=StopTime) {
// Для торговли внутри дня
}
// Ищем максимум
datetime td=iTime(Symbol(),PERIOD_D1,0);// Время открытия дневного бара в секундах от 01.01.1970int start=0;// Если конец временного диапазона ещё не наступил, начинаем поиск максимума с текущего бараif(CurrentMinutesFromDayStart>StopTime) {
datetime ts=td+StopTime*60;// конец временного диапазона в секундах от 01.01.1970
start= iBarShift(Symbol(),PERIOD_M1,ts,false);// смещение бара, которому принадлежит ts
}
int count=0;// Сколько баров до StartTimeif(CurrentMinutesFromDayStart>StartTime) {
ts=td+StartTime*60;// начало временного диапазона в секундах от 01.01.1970
count= iBarShift(Symbol(),PERIOD_M1,ts,false);// смещение бара, которому принадлежит ts
count= count-start;// Сколько баров длится временной интервал
}
double Maximum=iHigh(Symbol(),PERIOD_M1,iHighest(Symbol(),PERIOD_M1,MODE_HIGH,count,start));//Находим максимум на заданном временном интервалеreturn(0);
}
Hello all, please tell me who knows! I want to subscribe to a trading signal ( paid) and work on my desktop computer during the day and leave it on my netbook at night .... do i have to subscribe twice in two terminals? my question is if i have subscribed to the signal but i open the second terminal and it is empty.... i would like to ask you a more exact question. is it possible to open one and the same subscription (signal) on different terminals (on one account, of course) ....?
Forexman77: Still, how do I find the maximum of a given time interval? I tried to do it this way and to check the alert, but it doesn't work.
Well, I've already written and now I've tested it, and it works.
#property copyright "Copyright 2013, Mikhail <Sepulca> Kozhemyako"#property link "ua3xcm@obninsk.ru"externint StartHour=8;
externint StartMinute=1;
externint StopHour=23;
externint StopMinute=58;
int OldBar;
int init() { OldBar=Bars-1;return(0);}
int deinit() {return(0);}
int start(){
double Maximum;
int StartTime=StartHour*60+StartMinute;
int StopTime=StopHour*60+StopMinute;
int CurrentMinutesFromDayStart=Hour()*60+Minute();// Текущее время в минутах от начала дняif(CurrentMinutesFromDayStart>=StartTime && CurrentMinutesFromDayStart<=StopTime) {
// Для торговли внутри дня
}
datetime td=iTime(Symbol(),PERIOD_D1,0);// Время открытия дневного бара в секундах от 01.01.1970int start=0;// Если конец временного диапазона ещё не наступил, начинаем поиск максимума с текущего бараif(CurrentMinutesFromDayStart>StopTime) {
datetime ts=td+StopTime*60;// конец временного диапазона в секундах от 01.01.1970
start= iBarShift(Symbol(),PERIOD_M1,ts,false);// смещение бара, которому принадлежит ts
}
int count=0;// Сколько баров до StartTimeif(CurrentMinutesFromDayStart>StartTime) {
ts=td+StartTime*60;// начало временного диапазона в секундах от 01.01.1970
count= iBarShift(Symbol(),PERIOD_M1,ts,false);// смещение бара, которому принадлежит ts
count= count-start;// Сколко баров длится временной интервал
Maximum=iHigh(Symbol(),PERIOD_M1,iHighest(Symbol(),PERIOD_M1,MODE_HIGH,count,start));//Находим максимум на заданном временном интервале
}
else Maximum=-1;
if(OldBar<Bars){Print("Текущее время в минутах=",CurrentMinutesFromDayStart," Максимум с ",StartTime," минуты по ",StopTime," минуту =",DoubleToStr(Maximum,Digits));OldBar=Bars;}
return(0);
}
Hello. I'm trying to install a template in Metatrader in a VPS, but it won't work, although everything works fine on my home computer, can you tell me what the problem is?
Now you need to find the maximum price in this time range. I can find the maximum price:
but I can't tie it to the time range. Can you tell me how to do it?I've built it up, but haven't tested it yet. It seems to work
how do you set up an EA?
And, if you're in the middle of nowhere, you can familiarise yourself with it.
how to set up an EA?
how to set up an EA?
Still, how do I find the maximum of a given time interval? I tried to do it this way and to check the alert, but it doesn't work.
Well, I've already written and now I've tested it, and it works.
Well I've already written and now I've tested it, it works.
Thank you very much. Just fell off the wagon today. Had money stolen from my kiwi wallet((( Just now finished with the emails about the theft.
Screwdriver