Future Candles

 

Hi,

I'm working on an indicator which uses computationally intensive math in order to 'predict' the next future X candles.

The result, which I have, is 4 prices, OHLC, for each future X candles which I would like to visually use as a candle inserted to the right of the current price candle.

So, given that I have those 4 prices, how do I programatically create a new candle which doesn't exist yet in reality?


Possible?

 
MerlinBrasil:

Possible?

yes
 
MerlinBrasil:

Possible?

Draw a rectangle (Open - Close) put a line through it (High - Low) using objects . .

https://docs.mql4.com/objects

 
RaptorUK:

Draw a rectangle (Open - Close) put a line through it (High - Low) using objects . .

https://docs.mql4.com/objects


Thanks, Raptor. Your speed much appreciated.
 

If you want to use this indicator later in an EA, i suggest to use normal indicator buffers (MODE_HISTOGRAM), you can shift them also to the right.

https://www.mql5.com/en/code/10080 see this if you don't know how to use buffers in combination with histogram

 
zzuegg:

If you want to use this indicator later in an EA, i suggest to use normal indicator buffers (MODE_HISTOGRAM), you can shift them also to the right.

https://www.mql5.com/en/code/10080 see this if you don't know how to use buffers in combination with histogram


Very nice, zzuegg. Very simple example code!