You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
It’s simply a comparison based on time.
Instead of that, you can set any value you like, by the way.
Session times are taken from the broker, or you can set them manually.
I was referring to the internal code, not the call or the input parameter.
Here, Sec is set to a 24-hour range, but there is no from-to boundary. For example, if the requested time is 3 am and the session trades from 9 pm to 8 am, it should return true, but the condition will not be met and will return false.
I was talking about the internal code, not the call and the input parameter.
Here, Sec is expressed in a 24-hour range, but there is no ‘from-to’ boundary. For example, if the requested time is 3 am and the session trades from 9 pm to 8 am, it should return ‘true’, but the condition will not be met and will return ‘false’.
This can be configured using two sessions:
21-24 and 0-8
Is this a theoretical question, or do dealing centres actually have such ‘from-to’ ranges?
This can be set using two sessions:
21–24 and 0–8
Is this just a theoretical question, or do distribution centres actually have such ‘from-to’ ranges?
What does ‘set two sessions’ mean?
It is possible to specify sessions manually for each day in the sunput files. The programme will operate based on these.
Enables
#define LoadSessionFromInputs // Read sessions from inputs
In this case, SymbolInfoSessionTrade returns the ‘to’ time taking into account the additional day (at least that’s how it used to be – I haven’t checked right now), i.e. the condition‘from < to’ was always maintained.
So 20:00 – 32:00?
If there’s a working example from the dealing centre that we can test on, we can adapt the code to that example and check it.
At the moment, there’s a simple solution – manually split the session in two at midnight. And you can specify which day – for example, on Saturday until 08:00 – the remainder from Friday, or on Sunday from 20:00 – the start of Monday.
So, 8.00 pm – 3.00 am?
Yes. I don’t have a ready-made data centre with a server like that in mind. I’ll have to look for one somewhere in New Zealand.
I did it like this using the custom character editor:
I set up the custom symbol editor as follows:
I modified the function:
The added code checks that the end time is < the start time of the session and then simply adds one day to the end time.
I tested this with the following sessions :
Day: 1 Trading sessions: 1: 23:55–00:05
Day: 2 Trading sessions: 1: 00:15–00:17
First session carried over to the following day:
29 June 2020 23:55:03 29 June 2020 23:55:03
29 June29 June 2020 23:55:09 29 June 2020 23:55:09
2929 June 2020 23:56:39 29 June 2020 23:56:39
2929 June 2020 23:57:01 29 June 2020 23:57:01
29 June 2020 23:59:59 29 June29 June 2020 23:59:59
30 June 2020 00:00:00 30 June 2020 00:00:00
30 June 202030 June 2020 00:00:08 30 June 2020 00:00:08
30 June 2020.30 June 2020 00:01:52 30 June 2020 00:01:52
30 June 2020 00:02:02 30 June 202030 June 00:02:02
30 June 2020 00:02:30 30 June 2020 00:02:30
30 June 2020.30 June 2020 00:03:25 30 June 2020 00:03:25
3030 June 2020 00:03:31 30 June 2020 00:03:31
Second session, as usual, in a single day:
30 June 2020 00:15:29 30 June 2020 00:15:29
30 June 2020 00:16:01 30 June 2020.30 June 2020 00:16:01
30 June 2020 00:16:09 30 June 2020 00:16:09
The first session is in a week’s time:
6 July 2020 23:55:01 6 July 2020 23:55:01
6 July 20206 July 2020 23:55:09 6 July 2020 23:55:09