Vratislav Tukal: how can I display profit
-
Play videoPlease edit your post.
For large amounts of code, attach it DoubleToStr(MarketInfo(Symbol(),MODE_SPREAD)/10,1)
Don't assume that you are using a 5 digit broker.DoubleToStr(MarketInfo(0,MODE_ASK), 5)
Don't assume that you are not using JPY pairs.double pip = StringFind(_Symbol,"JPY") < 0 ? 0.01 : 0.0001; int pipDigits = (int)MathLog10(pip/_Point); int pipsToPoints = int(pip / _Point); int slippage = 3 * pipsToPoints;
- Find "profit," substitute "XXXXXXX." What's the problem?
whroeder1:
-
Please edit your post.
For large amounts of code, attach it - Don't assume that you are using a 5 digit broker.
- Don't assume that you are not using JPY pairs.
- Find "profit," substitute "XXXXXXX." What's the problem?
Thank you. But if I use OrderProfit() instead of XXXXXXX, it show me only last opened trade of All Pairs...
Vratislav Tukal: it show me only last opened trade of All Pairs...
| Using OrdersTotal directly and/or no Magic number filtering on your OrderSelect loop means your code is incompatible with every EA (including itself on other charts and manual trading.) Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 forum |

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
Hello, please, help me, how can I display profit of Each pair by Comment function. Thank you for your help...
Comment(
"-------------------------\n"
" CHART INFO\n"
"-------------------------\n"
"Symbol: " + ChartSymbol()+ "\n"
"Timeframe: " + DoubleToStr(ChartPeriod(), 0)+ " minutes\n"
"Actual Spread: "+ DoubleToStr(MarketInfo(Symbol(),MODE_SPREAD)/10,1)+ " pips\n"
"ASK Price: " + DoubleToStr(MarketInfo(0,MODE_ASK), 5)+ "\n"
"BID Price: " + DoubleToStr(MarketInfo(0,MODE_BID), 5)+ "\n"
"Profit: " XXXXXXXX + " " + AccountCurrency()+"\n"
);