ECURRENCY TEAM: Warning Message "implicit conversion from 'number' to 'string'"
please fix it....
- Please don't post an image of code or the editor — it is generally to small to be read.
Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Messages Editor - You know what the problem is. Fix it. Period() is a number, cast it to a string.
- You haven't stated a problem, you stated a want. You have only four
choices:
- Search forit.
- Beg at
- Coding help - MQL4 programming forum
- Requests & Ideas (MQL5 only!) - Trade FX - Expert Advisors and Automated Trading - MQL5 programming forum
- Free coding for your trading system.. - Easy Trading Strategy - General - MQL5 programming forum
- I will code & automate your strategy for free - Options Trading Strategies - General - MQL5 programming forum
- Make It No Repaint Please! - MetaTrader 5 - MQL4 programming forum
- learn to code it. If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
- or pay (Freelance) someone to code it.
No free help
urgent help.

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
The below code is showing Warning Message "implicit conversion from 'number' to 'string'"
please fix it....
#property strict
#property indicator_chart_window
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Blue
#property indicator_color2 Red
//---- input parameters
extern int ADX_period = 14;
extern bool UseADX_level = true;
extern double ADX_level = 23.6;
extern int CountBars=350;
extern bool Alert =true;
extern bool Sound =true;
extern bool Alert_via_Mobile = true;
extern string SoundFile="wait.waw";
//---- buffers
double val1[];
double val2[];
double b4plusdi,nowplusdi,b4minusdi,nowminusdi,b4adxmain,nowadxmain;
bool SoundBuy=False;
bool SoundSell=False;
string mss ="";
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
//---- indicator line
IndicatorBuffers(2);
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,108);
SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(1,108);
SetIndexBuffer(0,val1);
SetIndexBuffer(1,val2);
IndicatorShortName(short_name);
SetIndexLabel(0,short_name);
//----
return(0);
}
//+------------------------------------------------------------------+
//| AltrTrend_Signal_v2_2 |
//+------------------------------------------------------------------+
int start()
{
if (CountBars>=Bars) CountBars=Bars;
SetIndexDrawBegin(0,Bars-CountBars);
SetIndexDrawBegin(1,Bars-CountBars);
int i,shift,limit,CountedBars=IndicatorCounted();
if (CountedBars < 1)
{
for(i=0; i<=CountBars; i++) {val1[i]=0.0; val2[i]=0.0;}
}
if(CountedBars > 0) CountedBars--;
//----
limit=Bars - CountedBars;
//----
for(shift=limit; shift>=0; shift--)
{
b4plusdi=iADX(NULL,0,ADX_period,PRICE_CLOSE,MODE_PLUSDI,shift+1);
nowplusdi=iADX(NULL,0,ADX_period,PRICE_CLOSE,MODE_PLUSDI,shift);
b4minusdi=iADX(NULL,0,ADX_period,PRICE_CLOSE,MODE_MINUSDI,shift+1);
nowminusdi=iADX(NULL,0,ADX_period,PRICE_CLOSE,MODE_MINUSDI,shift);
b4adxmain = iADX(NULL,0,ADX_period,PRICE_CLOSE,MODE_MAIN,shift+1);
nowadxmain = iADX(NULL,0,ADX_period,PRICE_CLOSE,MODE_MAIN,shift);
if (UseADX_level)
{
if (b4plusdi<b4minusdi && nowplusdi>nowminusdi && nowadxmain >= ADX_level)
val1[shift]=Low[shift]-5*Point;
if (b4adxmain < ADX_level && nowadxmain > ADX_level && nowplusdi>nowminusdi)
val1[shift]=Low[shift]-5*Point;
if (b4plusdi>b4minusdi && nowplusdi<nowminusdi && nowadxmain >= ADX_level)
val2[shift]=High[shift]+5*Point;
if (b4adxmain < ADX_level && nowadxmain > ADX_level && nowplusdi<nowminusdi)
val2[shift]=High[shift]+5*Point;
}
else
{
if (b4plusdi<b4minusdi && nowplusdi>nowminusdi)
{
val1[shift]=Low[shift]-5*Point;
}
if (b4plusdi>b4minusdi && nowplusdi<nowminusdi)
{
val2[shift]=High[shift]+5*Point;
}
}
}
if (val1[0]!=EMPTY_VALUE && val1[0]!=0 && SoundBuy)
{
SoundBuy=False;
if (Alert) Alert(Symbol(), " M", Period(), " ADX Cross UP");
if (Sound) PlaySound (SoundFile);
mss = Symbol()+ " M" + Period() +" ADX Cross UP ";
if (Alert_via_Mobile) SendNotification(mss);
}
if (!SoundBuy && (val1[0]==EMPTY_VALUE || val1[0]==0)) SoundBuy=True;
if (val2[0]!=EMPTY_VALUE && val2[0]!=0 && SoundSell)
{
SoundSell=False;
if (Sound) PlaySound (SoundFile);
mss = Symbol()+ " M" + Period() +" ADX Cross Down ";
if (Alert_via_Mobile) SendNotification(mss);
}
if (!SoundSell && (val2[0]==EMPTY_VALUE || val2[0]==0)) SoundSell=True;
return(0);
}
//+------