How to get candle prices body between open and close?

 

Hi

I need to get prices between one candle Body and then call if this prices is exist in Moving Average.

Moving average not problem to get, but how can I get Price with Body Candles.
Prices just like that: 1.22500, 1.22511, 1.22522 and then simple use with moving average if Exists price between candle Body (Open/Close) use something?

Just need to know how to get all prices between candle body?


Thanks.

 
chris.dotan: Just need to know how to get all prices between candle body?

There is no “get all prices,” unless you stored them as the candle formed.

Just see if price crossed the MA.

double ma      = …;
double bodyTop = MathMax( Open[i], Close[i] );  //  iOpen(_Symbol, _Period, i)
double bodyBot = MathMin( Open[i], Close[i] );  // iClose(_Symbol, _Period, i)
bool   didPriceCross = bodyTop >= ma && ma >= bodyBot;
 
William Roeder #:

There is no “get all prices,” unless you stored them as the candle formed.

Just see if price crossed the MA.

thanks it works!