
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
I have successfully duplicated the answers you provided (within .01) and have one question about the values for ald.MinimalMargin.
Using my IBFX standard account, my ald.MinimalMargin is always $10, for both GBPJPY and EURUSD, whereas your amounts vary (such as 185.785 or 147.6).
Do you have any idea why your minimal margin amounts vary but mine do not?
I've duplicated your ald.OperationVolume amounts (within .01) and have one question.
When the calculation runs on your account, the ald.MinimalMargin varies.
When the calculation runs on my IBFX standard account, the ald.MinimalMargin is always $10.
QUESTION: Any idea why?
Here are the Alert values on my system using IDFX standard account. Notice that ald.MinimalMargin = 10 USD.
aas.Symbol = GBPJPY
aad.VARLimit = 3155 USD
aai.VARPoints = 50 points
aai.Command = 0
Processing:
ald.MinimalMargin = 10 USD
ald.MinimalPoint = 0.0942 USD
ali.PositionPoints = 106 points
aai.VARPoints = 50 points
ald.VARPositions = 0.4717 positions
aad.VARLimit = 3155 USD
ald.PositionLimit = 6688.6 USD
ald.VolumeLimit = 6.6886 lots
ald.VolumeStep = 0.01 lots
ald.NominalMargin = 1000 margin required (I inserted this line)
ald.MinimalVolume = 0.01 lots
Output:
ald.OperationVolume = 6.68
However, some brokers indicate "MODE_LOTSIZE" as "Lot size in the account currency".
In this case, "MODE_MARGINREQUIRED" means 1 lot size in the account currency divided by constant "AccountLeverage ()".
Thank you for effective collaboration.
Hello.
The revised sample of the operation volume computing:
You keep posting this code over and over in the forum, and in this case you thread-necro'ed a 2yr old thread to do so, and it is only correct for currency pairs that have the account's denomination as the counter-currency in the currency pair.
(If account denomination = USD and currency pair EURUSD then your code is correct...but it is wrong for USDJPY, EURJPY, etc)
I keep pointing this out, you keep ignoring it.
WHRoeder, do you have an updated version of this code that is valid for all currency pairs regardless of account denomination or being counter-currency?
Thanks.
WHRoeder, do you have an updated version of this code that is valid for all currency pairs regardless of account denomination or being counter-currency?
That code IS valid for any pair. Returns the change in account currency for one tick of the pair, any pair. No changes are needed, unless your stops are so big that tickValue changes significantly (I.E. 2000 pip SL.)
I keep pointing this out, you keep ignoring it.
As far as i know HERE you will find his latest complete basic code collection. Scroll down to his post with the attachment.
Thank you!