[Build138] Sessions with SQX using MT4/MT5 engine

[Build138] Sessions with SQX using MT4/MT5 engine
Lately i integrated Session times into the MT4/MT5 script ("Update SQX's & QA Instruments Information"),
This was done on behalf of @SQTeam request to me,
Now you can literately import all of your instruments sessions in 1 click into SQX, it looks like this:

<Session name="Corn - Trading Session times"> <Element dayFrom="Mon" dayTo="Mon" timeFrom="04:00" timeTo="16:45" eod="true" /> <Element dayFrom="Mon" dayTo="Mon" timeFrom="17:30" timeTo="22:20" eod="true" /> <Element dayFrom="Tue" dayTo="Tue" timeFrom="04:00" timeTo="16:45" eod="true" /> <Element dayFrom="Tue" dayTo="Tue" timeFrom="17:30" timeTo="22:20" eod="true" /> <Element dayFrom="Wed" dayTo="Wed" timeFrom="04:00" timeTo="16:45" eod="true" /> <Element dayFrom="Wed" dayTo="Wed" timeFrom="17:30" timeTo="22:20" eod="true" /> <Element dayFrom="Thu" dayTo="Thu" timeFrom="04:00" timeTo="16:45" eod="true" /> <Element dayFrom="Thu" dayTo="Thu" timeFrom="17:30" timeTo="22:20" eod="true" /> <Element dayFrom="Fri" dayTo="Fri" timeFrom="04:00" timeTo="16:45" eod="true" /> <Element dayFrom="Fri" dayTo="Fri" timeFrom="17:30" timeTo="22:20" eod="true" /> </Session>



Currently, SQX with MT4/MT5 do not use any Sessions,
It only used in SQX when using TradeStation and Multicharts in order to Cut out the un-used bars from the historical data for volume or strategic reasons.


in the example above with CORN session times i got from one of the FX/CFDs brokers we got 2 sessions a day as you can see above, 04:00~16:45 & 17:30~22:20  How do we go about that O_o?,
This is super important to have in SQX, without that trading is kinda out of sync, and with huge logs inside MT4/MT5 on "MARKET IS CLOSED" when the EA tries to manage orders when there is no trading goin on..


This is badly needed because SQX will develop strategies that it will think are perfectly tradable 24/5, but in the real world these trades wont be executed because the market was closed,
You might suggest using "Trading Options >> Time Range" but it would only cover and focus on one trading session, but what would we do in a case with CORN above where we have 2 trading sessions in a day?, we kinda limited here..

__

Any ways............., I would like to propose a simple solution for this:

Make "Sessions" drop-down menu available for MT4/MT5 "Trading Options Tab",
now unlike with TradeStation and MultiCharts engine where SQX will use sessions in order to Cut the historical data itself and use only the session times,
this is clearly un-needed for MT4/MT5, for obvious reasons that MT4/MT5 it self wont offer such a mechanism,
so SQX with MT4/MT5 engine will use Sessions only for allowing to trade or not, not cutting any historical data.

This in turn will give us more options in terms of trading times,
No errors inside MT4/MT5 saying "Market is Closed" with non stopping increasing log files,
More in sync results which means more accurate results, SQX wont trade on non-tradable hours of the days / non-tradable days overall.

Besides, right now we are very limited with Trading Times & Days inside SQX,
This will help a bunch!

Screenshot attached.
Attachments
  • Votes +25
  • Project StrategyQuant X
  • Type Feature
  • Status New
  • Priority Normal

History

k
#1

Karish

30.06.2022 13:50

Task created

TM
#2

Toni

30.06.2022 14:04
Voted for this task.
Cc
#3

Cyber

30.06.2022 15:01
Voted for this task.
Bt
#4

beetrader

30.06.2022 16:52
Voted for this task.
KB
#5

kbtech

30.06.2022 16:55
Voted for this task.
Bt
#6

beetrader

30.06.2022 16:55

Attachment Selection_346.png added

Selection_346.png
(19.67 KiB)
we get 24/7 quotes but for some instruments like Indexes and commodities, Brokers are now offering MT5 which comes with session during which you can trade.


Could we please have this bug fixed in SQX so that we get results close to reality.

Bt
#7

beetrader

30.06.2022 16:58

Subject changed from [Bug/Feature Suggestion] Sessions overall and focused on MT4/MT5 to v136 Dev2: Sessions not working in SQX which target MT4/MT5

k
#8

Karish

30.06.2022 17:16
Thank you for your time to Vote, this is super important,
Not only for MT5 like @beetrader mentioned, its important for MT4 as-well and all platforms,

There are specific times you can trade on, and there is really no reason to develop strategies that are trading during un tradable hours on paper, but in real time live account, heck even on real time demo account they wont enter any trades because the market will be closed on those instruments.

Sessions should be turned into a global thing for all platforms engines and act as i mentioned already,
with an ability "to 'Cut'" OR "do not 'Cut'" the historical data as needed..,

Build 136 would be perfect with Swaps and this new Sessions feature :),
100% in sync!
k
#9

Karish

30.06.2022 19:39

Attachment 1.png added

1.png
(37.49 KiB)

Another thing is that some Forex instruments and CFDs on MT4 even shows these Sessions:


Hence they are not really 24/5,

those few minutes can count when developing a strategy on 24/5,

anyway, this is a very simple task like i already explained when talking with @SQteam on discord:


I explained it in the Task i created for it but in any case this is a very simple idea, just take the already existing Sessions and make an optional parameter of "Cut historical data / Do Not Cut historical data", • If "Cut historical data" selected then SQX perform historical data Cutting so the Historical data will only contain the Sessions times, • On the other hand if "Do Not Cut historical data" selected then SQX wont Cut the historical data, it will stay as it is, the only thing that will happen is SQX will only allow to "Trade" on the specified Sessions times specified. That way you guys can remove those unnecessary options inside the "Trading Options Tab", and just integrate them into the Sessions settings or something so everything the field of TIMES and DAYS will be in 1 place ????



TV
#10

Tomas Vanek

30.06.2022 21:40

Type changed from Bug to Feature

4
#11

Jordan

02.07.2022 15:05
Voted for this task.
WO
#12

Kortezubi

02.07.2022 23:52
Voted for this task.
HH
#13

Hans

18.07.2022 22:02
Voted for this task.
E
#14

Emmanuel

06.08.2022 15:37
Voted for this task.
DJ
#15

ParryManta

07.12.2022 21:20
Voted for this task.
k
#16

Karish

16.12.2022 23:17
Voted for this task.
GM
#17

GermanMazza

17.12.2022 00:34
Voted for this task.
b
#18

bentra

17.12.2022 03:40
Voted for this task.
b
#19

blonado

03.01.2023 00:01
Voted for this task.
Wv
#20

eNeRGy Burns

22.01.2023 13:12
Voted for this task.
k
#21

Karish

14.02.2023 21:09
BUMP
M
#22

Manni

18.02.2023 08:19
Voted for this task.
k
#23

Karish

23.02.2023 20:57

Attachment image-0.png added

image-0.png
(5.75 KiB)
How do we trade this?

image.png
l
#24

Loonly

23.02.2023 21:12
Voted for this task.
CM
#25

chris@marsch.de

24.02.2023 07:41
Voted for this task.
b
#26

binhsir

24.02.2023 14:01
Voted for this task.
g
#27

geektrader

24.02.2023 19:16
Voted for this task.
AA
#28

Alex

09.09.2023 10:17
Voted for this task.
MP
#29

MP

03.12.2023 18:09
Voted for this task.
k
#30

Karish

15.03.2024 09:04

Attachment Sessions.png added

Sessions.png
(68.34 KiB)
@BUMP! - 2 years already come on...
FB
#31

TROBO

15.03.2024 10:04
Voted for this task.
GA
#32

GaryAitcheson

15.03.2024 11:47
Voted for this task.
A
#33

Asoea

28.03.2024 22:01
Voted for this task.

Votes: +25

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please