Please well format your code.
#property indicator_separate_window //#property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Red int init() { //---- indicators SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,ExtMapBuffer); //---- return(0); } int deinit() { return(0); } int start() { Print(iMA(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,i)); return(0); }
try
Print( DoubleToStr( iMA(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,i)), 5);

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
I wrote the following code:
#property indicator_separate_window
//#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer);
//----
return(0);
}
int deinit()
{
return(0);
}
int start()
{
Print(iMA(NULL,0,10,0,MODE_EMA,PRICE_CLOSE,i));
return(0);
}
Two types of Output:
1)Output in indicator_separate_window mode
0.9976
2)OutPut in indicator_chart_window mode :
0.99763
Problem: Why does the code give two different result ?
thx.