[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 230

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,
Looking for an indicator/script that shows in the pair window the profit for that particular pair. I.e., when 3-5 pairs are traded, it is quite difficult to quickly calculate a profit on one of them if there is a build-up or lots.
If anyone has any suggestions, I would be very grateful.
Equity and balance indicator
Probably tweak the signal_MACD() function.
Well, that it would still return something.
I want it to return true instead of false, but I don't know how to do it =( tell me how... I'll remember it once and won't ask again )
here's the script... how do I make it return true?
here's the script... how do I make it return true?
Hello,
Looking for an indicator/script that shows in the pair window the profit for that particular pair. I.e., when 3-5 pairs are traded, it is quite difficult to quickly calculate a profit on one of them if there is a build-up or lots.
If anyone has any suggestions, I would be very grateful.
double CurrentProfit() { // Функция считает текущий профит/лосс для одной валютной пары double Profit=0; for(int i=OrdersTotal()-1; i>=0; i--){ if(!OrderSelect(i, SELECT_BY_POS, MODE_TRADES))continue; if(OrderSymbol()!=Symbol())continue; if(OrderMagicNumber()!=Magic) continue; if(OrderType()>1)continue; Profit+=OrderProfit(); } return(Profit);}
Insert in the Start function:
here's the script... how do I make it return true?
I want it to return true instead of false, but I don't know how to do it =( tell me... I'll remember it once and won't ask again )
A variable inside a function is just that - a variable.
It doesn't matter what it is called.
So, if function should return a value, this value must be returned explicitly:
return( ... );