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
If I understand correctly,
okay makes sense
If I understand correctly,
The question is why do you need a structure ?
What is your goal ?
Just using SymbolInfoSessionTrade() when needed is not enough ?
The question is why do you need a structure ?
What is your goal ?
Just using SymbolInfoSessionTrade() when needed is not enough ?
Hello
It smells like a trap, but here are my arguments.
the SymbolInfoSessionTrade() function will always return the same results per day of the week.
It's almost like asking for the return of a constant.
It's better to store them when loading once and for all than to have to request them every X ticks, knowing that _a will not change....
It also seems that it is intended that these return values never change since ENUM_SYMBOL_TRADE_MODE is present
Hello
It smells like a trap, but here are my arguments.
the SymbolInfoSessionTrade() function will always return the same results per day of the week.
It's almost like asking for the return of a constant.
It's better to store them when loading once and for all than to have to request them every X ticks, knowing that _a will not change....
It also seems that it is intended that these return values never change since ENUM_SYMBOL_TRADE_MODE is present
Clear arguments.
Though,
1. You don't know if they will change or not. Say you start and fill your structure a Monday, with data for all the week(s), Tuesday the broker decide to change the Friday sessions. Your structure data are now outdated.
2. These data are already recorded somehow (structure or whatever) in the Terminal, believe me this function SymbolInfoSessionTrade() doesn't poll the server, so you are just creating an additional layer which you will ALSO need to check to get the needed data. Data which are possibly now outdated.
3. The code to get the information ('is a given datetime currently an a trading session ?') is very fast, executing it even every tick is not a problem in a live environment. The optimization you are trying to do is called premature optimization. I posted the needed code, somewhere in the forum, years ago.
4. With the Strategy Tester, for sure you don't want to check that function every tick, say every minute is far enough. Checking it at max every minute is trivial and doesn't need to record these data (which anyway you would need to check too), if every minute is still too often (which I doubt), you can improve that to do it every 5 minutes, every hour, whatever...still without a need to record.
Of course, you do as you want. Just want to share my experience.
Clear arguments.
Though,
1. You don't know if they will change or not. Say you start and fill your structure a Monday, with data for all the week(s), Tuesday the broker decide to change the Friday sessions. Your structure data are now outdated.
2. These data are already recorded somehow (structure or whatever) in the Terminal, believe me this function SymbolInfoSessionTrade() doesn't poll the server, so you are just creating an additional layer which you will ALSO need to check to get the needed data. Data which are possibly now outdated.
3. The code to get the information ('is a given datetime currently an a trading session ?') is very fast, executing it even every tick is not a problem in a live environment. The optimization you are trying to do is called premature optimization. I posted the needed code, somewhere in the forum, years ago.
4. With the Strategy Tester, for sure you don't want to check that function every tick, say every minute is far enough. Checking it at max every minute is trivial and doesn't need to record these data (which anyway you would need to check too), if every minute is still too often (which I doubt), you can improve that to do it every 5 minutes, every hour, whatever...still without a need to record.
Of course, you do as you want. Just want to share my experience.
how often does the terminal poll the server for a change in these structures ? if you know
(and can you whisper in their ear to force brokers -if they can- to fill up the other symbol info stuff properly ? thanks)
how often does the terminal poll the server for a change in these structures ? if you know
(and can you whisper in their ear to force brokers -if they can- to fill up the other symbol info stuff properly ? thanks)
Even MetaQuotes can't force brokers to be responsible and competent. I already read Renat (MetaQuotes CEO) complaining about that, sometimes a broker is running an outdated version of the server itself, so don't even think about the server configuration and data.
I would recommend everyone to use serious and competent brokers. If you noticed wrong data provided, ask them to fix it (an error or bug can always happen). If they do it quickly, fine, otherwise change your broker.
Just want to share my experience.
THANKS