Signal with CiMA getting MAX_DBL

 

Hi, I'm creating my first signal with CiMA and every bar I'm getting 1.#INF because the ma.Main(i) is returning 1.797693134862316e+308 

My Code is here: 

ma = new CiMA;
ma.Create(_Symbol, Period(),10,0,MODE_EMA,PRICE_CLOSE);

 and I'm trying to use:  

ma.Main(i)  

where i is the common iterator between bars.

What's missing here? 

 
jonatas:

Hi, I'm creating my first signal with CiMA and every bar I'm getting 1.#INF because the ma.Main(i) is returning 1.797693134862316e+308 

My Code is here: 

 and I'm trying to use:  

where i is the common iterator between bars.

What's missing here? 

Use:

if(ma.Refresh(-1))   value=ma.Main(1);


 
uncleVic:

Use:

if(ma.Refresh(-1))   value=ma.Main(1);


it's continue the same error. I can't declare this if because the Refresh() method is void.

 

 
jonatas:

it's continue the same error. I can't declare this if because the Refresh() method is void.

 

ma.Refresh(-1);

value=ma.Main(1);

 
jonatas: I'm getting 1.#INF because the ma.Main(i) is returning 1.797693134862316e+308

double DBL_MAX == EMPTY_VALUE