string price_as_str = StringFormat("%0."+(string)_Digits+"f",Bid); int len = StringLen(price_as_str); Print("price_as_str = ",price_as_str); Print("Before the decimal point = ", StringSubstr(price_as_str, 0, len-_Digits-1)); Print("After the decimal point = ", StringSubstr(price_as_str, len-_Digits));
Once again thanks so much more for your one of greatest comments - @honest_knave and @Marco vd Heijden After I tried your very useful examples, then I found great solution.
You can only apply 1 EA per chart. This will probably mean you need to incorporate your panel and your strategy together, if they both need to perform trading operations.
If it's really, really necessary you can have one ea work with all other charts, by using the chartID and then you can load another EA on the chart itself, and you can even go as far as loading a script that runs it's code in an endless loop but these things are highly advanced so it depends on how far you want to push it.
I think I could start write code script for Trading Strategy before I combine them. ( if I will not write script for Trading Strategy separately - I know for sure that will be so hard for me )
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.
Digits can call Digits() or MarketInfo().
double digits = MarketInfo(Symbol(),MODE_DIGITS);
Now if you want a multiplier quick example be creative:
if(MarketInfo(Symbol(),MODE_DIGITS)==2){multiplier=100;}
if(MarketInfo(Symbol(),MODE_DIGITS)==3){multiplier=1000;}
if(MarketInfo(Symbol(),MODE_DIGITS)==4){multiplier=10000;}
if(MarketInfo(Symbol(),MODE_DIGITS)==5){multiplier=100000;}
if(MarketInfo(Symbol(),MODE_DIGITS)==6){multiplier=1000000;}
double EURUSD=Bid*multiplier;
Print("EURUSD: ",DoubleToString(EURUSD,0));
int len = StringLen(price_as_str);
Print("price_as_str = ",price_as_str);
Print("Before the decimal point = ", StringSubstr(price_as_str, 0, len-_Digits-1));
Print("After the decimal point = ", StringSubstr(price_as_str, len-_Digits));
Hehe!
I hope both of your comments will help for my solution.
I will start to try both of them soon.
Thanks a lot men.
#StringLen - Close
Once again thanks so much more for your one of greatest comments - @honest_knave and @Marco vd Heijden
After I tried your very useful examples, then I found great solution.
All the best to you!
#Lot Size Max - Closed
That comments solves my issue #336 - #338
Once again thanks a lot.
#Trade Panel + Trading Strategy - Open
Before I starts to researching I just need to ask.
Q: Trade Panel and Trading Strategy should be separately or what?
Thanks in advance.
#Trade Panel + Trading Strategy - Open
Before I starts to researching I just need to ask.
Q: Trade Panel and Trading Strategy should be separately or what?
Thanks in advance.
You can only apply 1 EA per chart.
This will probably mean you need to incorporate your panel and your strategy together, if they both need to perform trading operations.
You can only apply 1 EA per chart.
This will probably mean you need to incorporate your panel and your strategy together, if they both need to perform trading operations.
#Trade Panel + Trading Strategy - Closed
Thank you Mr. Marco for your comment.
I think I could start write code script for Trading Strategy before I combine them.
( if I will not write script for Trading Strategy separately - I know for sure that will be so hard for me )
Soon I will start.
Thanks a lot for your time.