Open/Close Indicator

Questions about MultiCharts and user contributed studies.
BC_Trading
Posts: 7
Joined: 24 Nov 2016
Has thanked: 3 times

Open/Close Indicator

Postby BC_Trading » 04 Jan 2017

Happy new Year,

during the holidays i dedust my bookshelf and found an old book from the early 2000 called "Neue Tradingdimensionen" by Erich Florek. He showed some interesting Trading approaches. In one of the chapters he introduced the MK_OpenClose_Indicator. This indicator uses an illustration in which a price development is displayed from the respective opening price. I found an illustration (see attachment) in a german Trading Forum.

In my infinite naivete I tried to program a similar indicator, I created a 5-Minute Chart to plot the
This is my first try and it failed. :oops:

Code: Select all

//OpenCloseIndicator
Variables: OpenCloseIndicator (0);

OpenCloseIndicator = close-openD(0) ;

if date<>date[1]
then begin

plot1(OpenCloseIndicator,"OC",Red,Default,5);

end;
Any Ideas?

I appreciate any help to get this indicator running.
Attachments
WikiImage.jpeg
(14.98 KiB) Downloaded 898 times

User avatar
TJ
Posts: 7235
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 991 times
Been thanked: 2058 times

Re: Open/Close Indicator

Postby TJ » 04 Jan 2017

Happy new Year,

during the holidays i dedust my bookshelf and found an old book from the early 2000 called "Neue Tradingdimensionen" by Erich Florek. He showed some interesting Trading approaches. In one of the chapters he introduced the MK_OpenClose_Indicator. This indicator uses an illustration in which a price development is displayed from the respective opening price. I found an illustration (see attachment) in a german Trading Forum.

In my infinite naivete I tried to program a similar indicator, I created a 5-Minute Chart to plot the
This is my first try and it failed. :oops:

Code: Select all

//OpenCloseIndicator
Variables: OpenCloseIndicator (0);

OpenCloseIndicator = close-openD(0) ;

if date<>date[1]
then begin

plot1(OpenCloseIndicator,"OC",Red,Default,5);

end;
Any Ideas?

I appreciate any help to get this indicator running.

>This is my first try and it failed

Can you describe "failed"?

What do you see that you are not happy about?

BC_Trading
Posts: 7
Joined: 24 Nov 2016
Has thanked: 3 times

Re: Open/Close Indicator

Postby BC_Trading » 04 Jan 2017

Hi TJ,

thanks for the fast reply. The Indicator is plotting only a straight line. I think this is only the difference from the opening to the closing of the day.
Attachments
MultiCharts3.png
(46.61 KiB) Downloaded 891 times

User avatar
ABC
Posts: 636
Joined: 16 Dec 2006
Has thanked: 120 times
Been thanked: 359 times
Contact:

Re: Open/Close Indicator

Postby ABC » 04 Jan 2017

BC_Trading,

do you get the result you want when you don't limit the plotting to the date change?

Code: Select all

//OpenCloseIndicator
Variables: OpenCloseIndicator (0);

OpenCloseIndicator = close-openD(0) ;

plot1(OpenCloseIndicator,"OC",Red,Default,5);
You can probably polish it a bit more and have it display actual bars if you want (by also building the difference to the Open, High and Low of the bar).

Regards,

ABC

BC_Trading
Posts: 7
Joined: 24 Nov 2016
Has thanked: 3 times

Re: Open/Close Indicator

Postby BC_Trading » 04 Jan 2017

Hallo ABC,

this sounds great, but i am struggling already by creating a simple line chart of the price development. I am not the brightest light in programming :-)

BC_Trading
Posts: 7
Joined: 24 Nov 2016
Has thanked: 3 times

Re: Open/Close Indicator

Postby BC_Trading » 05 Jan 2017

@ABC Thanks for your hints.

Code: Select all

//OpenCloseIndicator
Inputs: ATRLength(5), ATRMult (.5);
Variables: OpenCloseIndicator (0),
OpenHighIndicator (0),
OpenLowIndicator (0),
OpenOpenIndicator (0),
UpLevel(0),
DownLevel(0);

//Indicator
OpenCloseIndicator = close-openD(0) ;
OpenHighIndicator = high-openD(0);
OpenLowIndicator = low-openD(0);
OpenOpenIndicator = open-openD(0);
//Range
Uplevel = 0 + ((averagetruerange(ATRLength) of data2)*ATRMult);
DownLevel = 0 - ((averagetruerange(ATRLength) of data2)*ATRMult);

//Plots
plot1(OpenCloseIndicator,"OC",Red,Default,2);
plot2(0,"Zero",Black,Default,1);
plot3(UpLevel,"UpLevel",Blue,Default,1);
plot4(DownLevel,"DownLevel",Red,Default,1);
You can probably polish it a bit more and have it display actual bars if you want (by also building the difference to the Open, High and Low of the bar).
I created 4 variables to calculate the open, high,low and close of the indicator. Now I am searching for a Keyword or function to plot the indicator as a barchart. The Plot function only produce lines. Is there a function to creating indicators displayed as a barchart?

Greetings

User avatar
ABC
Posts: 636
Joined: 16 Dec 2006
Has thanked: 120 times
Been thanked: 359 times
Contact:

Re: Open/Close Indicator

Postby ABC » 05 Jan 2017

BC_Trading,

you can't accomplish this with keywords, but you can set it up with the plot styles under the indicator properties.
Simply set the Open to "Left Tick", the High to "Bar High", Low to "Bar Low" and Close to "Right Tick".

Regards,

ABC


Return to “MultiCharts”