Alternative open high low and closes on chart bars....

 

hi all

as an aide to my learning MQL4, im still trawling through a book by jason perl on demark indicators. he states he uses the 20:00 gmt as the Close, as it is the end of the busyiest session.

therefore ....does anyone know if it is possible to set up a 'custom' chart so as to display different opens and closes etc and then use for the usual TA etc.

for example: a daily chart where the open is GMT 08:00 hpurs, the close is GMT 20:00 hours, the high is the highest price inbetween the two times and the low is the lowest price between the two times. then attach the usual indicators etc.

Any pointers gratefully recieved.

chaeljc

 

just keeping it on the page.

 

..

 

There are several ways to display 'custom candle' on chart. All not simple AFAIK.

The visual part : you can use rectangles and trendlines objects if you like to display it on separate sub-window. Or you can use paired Histogram like Heiken Ashi in Main window.
Added : You can find many 'chart custom candles' Indies on googling it. Here's my latest finding. relative "strength" from mql4.ru

The calculation part : Indicator Period_Converter produces a Chart that you can set Indicators on (and trade on?) It's more difficult but 'superior'.
You need to embed your calculation to replace/produce your custom OHLC.

Or a simpler approach would be to make it a Heiken Ashi-like indicator (set the original Candles/line color to None). And to 'attach' Indicators on it, you need to calculate indicators 'attached' to it base on the 'Candle's' iCustom values...

FWIW

 
cameofx wrote >>

There are several ways to display 'custom candle' on chart. All not simple AFAIK.

The visual part : you can use rectangles and trendlines objects if you like to display it on separate sub-window. Or you can use paired Histogram like Heiken Ashi in Main window.
Added : You can find many 'chart custom candles' Indies on googling it. Here's my latest finding. relative "strength" from mql4.ru

The calculation part : Indicator Period_Converter produces a Chart that you can set Indicators on (and trade on?) It's more difficult but 'superior'.
You need to embed your calculation to replace/produce your custom OHLC.

Or a simpler approach would be to make it a Heiken Ashi-like indicator (set the original Candles/line color to None). And to 'attach' Indicators on it, you need to calculate indicators 'attached' to it base on the 'Candle's' iCustom values...

FWIW


Hi cameofx

many thanks for your reply. i took a look at your examples and they are very interesting tho not quite what i was looking for. To explain a bit better.....

I have seen somewhere an article about a custom 'period converter' ( see article https://www.mql5.com/en/code/7673 which also refers to "P4L PeriodCon.mq4" which creates a brand new custom offline chart, which if i read it correctly you can trade on and where each bar can be of a size of your choosing ie 10 mins etc. only thing is i cant fully understand it and whether it can do what im looking for example:

on 1st Jan 2010 the bar's open time is 08:00am GMT (or other you may choose)

the same bar's close is 22:00hrs

the time between 200:00 hrs and the open of the next bar is skipped ...

the very next bar - 2nd Jan 2010 the open is 08:00hrs etc..

No candles are 'created' as such and overlayed onto a chart .... it is the charts actual bars have the above parameters.

If i read it correctly the "P4L PeriodCon.mq4" links to another chart to automatically update itself allowing you to trade on it.

You may ask why ... Jason Perl states that when using the Demark indicators he uses 20:00hrs gmt as the cut of time for his bars. some of the indicators rely on the overnight 'mocement' or 'pressure' from the previous nights close to the next days open to validate the indicators. Such a modified chart would allow me properly assess and feed back to group (NB: dont be in a hurry guys and gals as i am both limited in my time i can devote mql4 learing and testing .. but i will def feedback).

I hope that explains a little better.

many thanks for your input so far and apologies for my delay in replying.

kind regards

chael

 

... No candles are 'created' as such and overlayed onto a chart .... it is the charts actual bars have the above parameters...

If no candles are 'created' and overlayed, and you want to use the 'actual' bars, then it can't be done. You cannot alter the original MT OHLC & Time values.
MT controls the OHLC-T that drives the bar chart -- Broker may have some control as well, like setting the server - and consequently candle - time, not to mention the price tick in some occasions ;).
But you can create a simulated chart with a simulated (and altered) OHLC-T. With this you can visually see your 'altered' candle, and use its data. And put other indicators base on it values.

 
cameofx wrote >>

If no candles are 'created' and overlayed, and you want to use the 'actual' bars, then it can't be done. You cannot alter the original MT OHLC & Time values.
MT controls the OHLC-T that drives the bar chart -- Broker may have some control as well, like setting the server - and consequently candle - time, not to mention the price tick in some occasions ;).
But you can create a simulated chart with a simulated (and altered) OHLC-T. With this you can visually see your 'altered' candle, and use its data. And put other indicators base on it values.


many thanks cameofx .. i think the simulated chart is what im looking for. i'll give it a go a let yous know how i get on.

kind regards C

Reason: