Dukascopy
 
 
Wiki JStore Search Login

Как ограничить работу советника по времени (евросессия)
 Post subject: Как ограничить работу советника по времени (евросессия) Post rating: 0   New post Posted: Wed 26 Oct, 2016, 06:25 
User avatar

User rating: 0
Joined: Tue 04 Oct, 2016, 15:07
Posts: 6
Location: Ukraine, Dnipro
Как заставить советник работать только в евросессию. Переменная LastCandle.CandleTime возвращает значение в формате чч.мм.гг ч:мин и фактически это целое кол-во секунд.
Т.е. другими словами как преобразовать тип DateTime в несуществующий в VJF Time. Вариант через String здесь как я понимаю не применим.


 
 Post subject: Re: Как ограничить работу советника по времени (евросессия) Post rating: 0   New post Posted: Wed 26 Oct, 2016, 10:20 
User avatar

User rating: 6
Joined: Wed 05 Mar, 2014, 12:00
Posts: 116
Location: Ukraine, Odessa
Используйте Блок GetTimeUnit который будет возвращать HOUR. Таким образом получая Час каждой свечи вы сможете ограничить время торговли Часами Европейской сессии.
Image


Attachments:
Безымянный.png [57.12 KiB]
Downloaded 1574 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Как ограничить работу советника по времени (евросессия) Post rating: 0   New post Posted: Wed 12 Jul, 2017, 19:08 
User avatar

User rating: 0
Joined: Fri 12 May, 2017, 15:35
Posts: 5
Location: Russian Federation, Москва
Создаем переменную Integer c названием Trade_Hour
Берем блок "Get Time Unit", в верхний слот вставляем переменную Candle Time из раздела OnCadle, в нижний слот переменную Trade_Hour
В настройке блока выбираем Hour
С помощью блоков IF задаем нужное время (GMT)
На скрине сделана схема с днями недели Пн-Чт 6-19 Пт 9-17

Image


Attachments:
Скриншот 2017-07-12 20.39.13.png [145.16 KiB]
Downloaded 1498 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 

Jump to:  

cron
  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com