Hello
1005phillip, If you are still around this forum. Thank you for your
instructions and code that you provided to calculate correct investments for cross
currencies. Is it possible to use your code to open various cross currencies
from one major currency chart or do the cross currencies always have to be the current
chart for your code to open the cross currencies? Please advise if you will.
If
1005phillip is no longer around this forum. Would anyone else know how to open various
cross currencies from one major currency chart?
I'm currently running this few lines for my lot sizing, and after adding these lines, I'm getting to 4051 error. Check if it's my code that is causing it? Because without it, I don't have that issue.
inputbool isSizingOn = true; // Auto Lot Sizinginputint Risk = 1; // Risk level (%)intOnInit(){
if(Digits == 5 || Digits == 3 || Digits == 1)P = 10;else P = 1; // To account for 5 digit brokersif(Digits == 3 || Digits == 2) isYenPair = true; // Adjust for YenPairif (isSizingOn == true)
{
Lots = Entry_Amount;
Lots = Risk * 0.01 * AccountBalance() / (MarketInfo(Symbol(),MODE_LOTSIZE) * Stop_Loss * P * Point); // Sizing Algo based on account sizeif(isYenPair == true) Lots = Lots * 100; // Adjust for Yen Pairs
Lots = NormalizeDouble(Lots, 2); // Round to 2 decimal place
}
}
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.
Hello 1005phillip, If you are still around this forum. Thank you for your instructions and code that you provided to calculate correct investments for cross currencies. Is it possible to use your code to open various cross currencies from one major currency chart or do the cross currencies always have to be the current chart for your code to open the cross currencies? Please advise if you will.
If 1005phillip is no longer around this forum. Would anyone else know how to open various cross currencies from one major currency chart?
Best regards
If 1005phillip is no longer around this forum. Would anyone else know how to open various cross currencies from one major currency chart?
Best regards1) You'd better have opened a new thread
2) What exactly do you mean with "open various crosseds .."?
Hi guys, sorry to bring this thread up again.
I'm currently running this few lines for my lot sizing, and after adding these lines, I'm getting to 4051 error. Check if it's my code that is causing it? Because without it, I don't have that issue.
Thanks!