Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 934
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
What's wrong? Why are there blue areas left out?
Could you please tell me how to organise the recalculation of the deposit currency.
My robot calculates the lot based on the balance and funds in the account. But this is, of course, if the deposit is in dollars.
If I open a ruble deposit, then I have to divide the lot by the usdrur rate.
Can I allow my Expert Advisor to look at the deposit currency and, if necessary, divide it by usdrur?
Could you please tell me how to organise the recalculation of the deposit currency.
My robot calculates the lot based on the balance and funds in the account. But this is, of course, if the deposit is in dollars.
If I open a ruble deposit, then I have to divide the lot by the usdrur rate.
Can I allow my Expert Advisor to look at the deposit currency and, if necessary, divide it by usdrur?
I understand that, I just don't know how to write it correctly
For example:
double KursS=iClose("USDRUR",H1,0);
If AccountCurrency() = USD, then K=1;
If AccountCurrency() = RUR, thenK=KursS ;
How do I record this correctly?
I understand that, I just don't know how to write it correctly
For example:
double KursS=iClose("USDRUR",H1,0);
If AccountCurrency() = USD, then K=1;
If AccountCurrency() = RUR, thenK=KursS ;
How do I record this correctly?
You have skipped over it. First of all, you have to define the currency "USDRUR". If your deposit is in euros, you need to set EURUSD rate.
That is, you should define the string K_Symbol = "USDRUR"; provided that the deposit is in rubles.
I think you can figure out how to do it. If the broker opens accounts in other currencies, it would be additional checks.
You're the one who skipped over it. First, you have to determine that the currency you want is "USDRUR". If you want to save the deposit in euros, you have to set EURUSD rate.
I.e. to define string K_Symbol = "USDRUR"; on condition that the deposit is in rubles.
I think you can figure out how to do it. If the broker opens accounts in other currencies, it would be additional checks.
In words I understand everything. The question was how to record...
In words I understand everything. The question was how to write it down...
Well, there's everything in our dialogue.
The second option is a little shorter...
And the third option, for all occasions and all currencies of the deposit, a little more complicated, and I will not make it up, and ready do not have, there was no need to write.
Thank you so much!
If it makes things easier, I'll re-post it correctly. i've written a function for detecting flytags and i stumbled in something that i don't understand. if statement does not work. maybe i wrote something wrong somewhere, i want you to take a fresh look, because i don't understand why. i even recorded a debugger video showing equaling values, but it does not work. please put my brain back into))))
video link https://www.youtube.com/watch?v=k9Zo0SgrMCA
Note that I can't delete the previous post, I copied everything into html and removed the tag that is required to edit the post
Have you heard anything about comparing real numbers?
The solution to the problem was suggested a long time ago and more than once.
I deleted the previous post.