Thanks very much for getting back to me, but I fear you may have misunderstood my loosely phrased questions.
I'm
not interested in trading anything apart from CME futures. However a futures exchange is a rather different venue than a "bucket shop" FX
broker's '"B book"!
The first thing I'm trying to establish is whether this is the correct venue for asking my in all likelihood
increasingly technical questions.
Thanks very much for getting back to me, but I fear you may have misunderstood my loosely phrased questions.
I'm
not interested in trading anything apart from CME futures. However a futures exchange is a rather different venue than a "bucket shop"
FX broker's '"B book"!
The first thing I'm trying to establish is whether this is the correct venue for asking my in all
likelihood increasingly technical questions.
You can ask all questions you want but most likely you will not get answer from Metaquotes.
Alain Verleyen: You can ask all questions
you want but most likely you will not get answer from Metaquotes.
Thanks for that Alain. I couldn't get an answer from AMP either! There is no known way of getting MetaQuotes to respond to technical queries that a
futures broker cannot answer themselves?
Let's try this one out for size then:
Given that at AMP MT5 is communicating with (in my case) the external CME rather than the aforementioned internal "B book",
what precisely does the number returned by the MQL5 FreeMarginCheck() function represent?
Thanks for that Alain. I couldn't get an answer from AMP either! There is no known way of getting MetaQuotes to respond to technical queries
that a futures broker cannot answer themselves?
Let's try this one out for size then:
Given that at AMP MT5 is communicating with (in my case) the external CME rather than the aforementioned internal "B book",
what precisely does the number returned by the MQL5 FreeMarginCheck() function
represent?
This Expert Advisor is best used on the one minute timeframe. Try it on any and all currency pairs. It uses a random number generator to simulate simply tossing a coin to decide on the direction of each trade. It stays in the market 100% of the time. It provides an example of a minimal Expert Advisor programmed in an object-oriented style...
All this talk of Ray the Random Robot suddenly reminded me that what with one thing and another I had somehow neglected to ever upload his
offspring to this forum.
I've now put that right with this blast from the dim and distant past:
Trade Copier - Open Source - Multiplatform - Transmitter Side Trade Transmitter will Transmit Trades from MT5 Demo or Real accounts using CSV Files. Each trade request created manually or by other EAs on MT5 terminal will be automatically transmitted. Positions and...
All this talk of Ray the Random Robot suddenly reminded me that what with one thing and another I had somehow neglected to ever upload his
offspring to this forum.
I've now put that right with this blast from the dim and distant past:
Just in case this proves to be of interest to anyone else, testing on a live MT5/CQG account reveals that SymbolInfoDouble(xxx, SYMBOL_MARGIN_INITIAL)
and
SymbolInfoDouble(xxx, SYMBOL_MARGIN_MAINTENANCE)
both return the same number during RTH.
400.0 in the case of ES, which is the "day trading" margin.
How is one supposed to determine programmatically what the "overnight" margin is prior to opening a position?
Just in case this proves to be of interest to anyone else, testing on a live MT5/CQG account reveals that
SymbolInfoDouble(xxx, SYMBOL_MARGIN_INITIAL) and
SymbolInfoDouble(xxx, SYMBOL_MARGIN_MAINTENANCE)
both return the same number during RTH.
400.0 in the case of ES, which is the "day trading" margin.
How is one supposed to determine programmatically what the "overnight" margin is prior to opening a position?
That's an old broker issue, they don't provide the right margin maintenance.
You can try to ask them to fix it. Good luck with that.
The only way to deal with it is to use an parameter in your code and to provide the value yourself.
That's an old broker issue, they don't provide the right margin maintenance.
You can try to ask them to fix it. Good luck with that.
The only way to deal with it is to use an parameter in your code and to provide the value yourself.
Thanks Alain, but my question was intended to be rhetorical. Thanks also for your good wishes. I feel sure I will need all the luck I can muster!
The
trouble is the multiplier differs from one instrument to another. Hard coding the numbers will prove to be a right pain in the proverbial
posterior :(
Adding an appropriate "input setting" is probably the least of several evils.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I don't think that there is any ETF flavour.
Hi Keith,
Thanks very much for getting back to me, but I fear you may have misunderstood my loosely phrased questions.
I'm not interested in trading anything apart from CME futures. However a futures exchange is a rather different venue than a "bucket shop" FX broker's '"B book"!
The first thing I'm trying to establish is whether this is the correct venue for asking my in all likelihood increasingly technical questions.
Hi Keith,
Thanks very much for getting back to me, but I fear you may have misunderstood my loosely phrased questions.
I'm not interested in trading anything apart from CME futures. However a futures exchange is a rather different venue than a "bucket shop" FX broker's '"B book"!
The first thing I'm trying to establish is whether this is the correct venue for asking my in all likelihood increasingly technical questions.
You can ask all questions you want but most likely you will not get answer from Metaquotes.
Thanks for that Alain. I couldn't get an answer from AMP either! There is no known way of getting MetaQuotes to respond to technical queries that a futures broker cannot answer themselves?
Let's try this one out for size then:
Given that at AMP MT5 is communicating with (in my case) the external CME rather than the aforementioned internal "B book", what precisely does the number returned by the MQL5 FreeMarginCheck() function represent?
Thanks for that Alain. I couldn't get an answer from AMP either! There is no known way of getting MetaQuotes to respond to technical queries that a futures broker cannot answer themselves?
Let's try this one out for size then:
Given that at AMP MT5 is communicating with (in my case) the external CME rather than the aforementioned internal "B book", what precisely does the number returned by the MQL5 FreeMarginCheck() function represent?
Read the documentation https://www.mql5.com/en/docs/standardlibrary/tradeclasses/caccountinfo/caccountinfofreemargincheck
Read the documentation https://www.mql5.com/en/docs/standardlibrary/tradeclasses/caccountinfo/caccountinfofreemargincheck
Thanks for your suggestion Enrique, but strangely enough I first did that a very long time ago. See for example:
https://www.mql5.com/en/code/159
Ray the Random Robot didn't include some of the subtleties of real life trading, but I did RTM from cover to cover at the time.
Would you mind taking a look here for me?
https://www.mql5.com/en/docs/constants/environment_state/accountinformation
Where does it explain how to differentiate between "day trading" and "overnight" margin for example?
All this talk of Ray the Random Robot suddenly reminded me that what with one thing and another I had somehow neglected to ever upload his offspring to this forum.
I've now put that right with this blast from the dim and distant past:
https://www.mql5.com/en/code/27799
Enjoy!
All this talk of Ray the Random Robot suddenly reminded me that what with one thing and another I had somehow neglected to ever upload his offspring to this forum.
I've now put that right with this blast from the dim and distant past:
https://www.mql5.com/en/code/27799
Enjoy!
"Validation completed with errors"!
They didn't have that back in the day!!!
[Invalid price]
I'll leave sorting that out as an exercise for the interested reader.
Just in case this proves to be of interest to anyone else, testing on a live MT5/CQG account reveals that SymbolInfoDouble(xxx, SYMBOL_MARGIN_INITIAL) and SymbolInfoDouble(xxx, SYMBOL_MARGIN_MAINTENANCE) both return the same number during RTH.
400.0 in the case of ES, which is the "day trading" margin.
How is one supposed to determine programmatically what the "overnight" margin is prior to opening a position?
Just in case this proves to be of interest to anyone else, testing on a live MT5/CQG account reveals that SymbolInfoDouble(xxx, SYMBOL_MARGIN_INITIAL) and SymbolInfoDouble(xxx, SYMBOL_MARGIN_MAINTENANCE) both return the same number during RTH.
400.0 in the case of ES, which is the "day trading" margin.
How is one supposed to determine programmatically what the "overnight" margin is prior to opening a position?
That's an old broker issue, they don't provide the right margin maintenance.
You can try to ask them to fix it. Good luck with that.
The only way to deal with it is to use an parameter in your code and to provide the value yourself.
That's an old broker issue, they don't provide the right margin maintenance.
You can try to ask them to fix it. Good luck with that.
The only way to deal with it is to use an parameter in your code and to provide the value yourself.
Thanks Alain, but my question was intended to be rhetorical. Thanks also for your good wishes. I feel sure I will need all the luck I can muster!
The trouble is the multiplier differs from one instrument to another. Hard coding the numbers will prove to be a right pain in the proverbial posterior :(
Adding an appropriate "input setting" is probably the least of several evils.