Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 916
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
StringAdd() IntegerToString() - what's wrong?
In a string of the type
x=StringAdd(x,IntegerToString(y));
gives a yellow warning
implicit conversion from 'string' to 'number'
Good afternoon.
Task: calculate to a point the middle of the channel (to be used as a pending order). I set the borders of the channel manually.
I calculate it with the calculator
1.55974 - 1.55596 = 0.00378
Alert shows width = 0.0038
0.00378/2 = 0.00189
Alert gives out middle = 0.0019
Question: Why doesn't the program count the 5th digit?
When outputting to alert, comment, print, etc. (i.e., "to be seen clearly on the screen"), you need to convert it to text.
You'll get it:
P./S.: And for internal calculations - yes, NormalizeDouble(...).
P./S.: There is also, for example, useful information on this subject and a link to an article in the Forum Navigator.
StringAdd() IntegerToString() - what's wrong?
in a string of the type
x=StringAdd(x,IntegerToString(y));
gives a yellow warning
implicit conversion from 'string' to 'number'
StringAdd is of type bool.
All you have to do is specify the join to the end of the string (if x is of the string type in your case, of course):
P./S.: Good examples on strings are in this article, for example: https://www.mql5.com/ru/articles/585
(and there just type or copy-paste from the search page: StringAdd)
Please help me understand.
How do I write different lines in the EA from the indicator?
I have an indicator - MACD 2 Line. How to prescribe the lines from the indicator in my Expert Advisor?
Return values:
P./S.: How to put this into practice, if questions arise, can be found in a variety of searches on the website and/or in the textbook.
Good luck.
Hello all.
To test the strategy on H1 I need to get the previous day's close.
In the indicator I write the following (after declaring "CloseLine" in OnInit()) :
int OnCalculate(const int rates_total, const int prev_calculated,
const datetime &time[], const double &open[],
const double &high[], const double &low[],
const double &close[], const long &tick_volume[],
const long &volume[], const int &spread[])
{
Close_Day=iClose("EURUSD",PERIOD_D1,1);
ObjectSet("CloseLine",OBJPROP_PRICE1,Close_Day);
return(rates_total);
}
As a result, the price from Day TF is not changed and the line is not rearranged.
Please help.
Thank you