[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AnyOHLC.zip - access any bar's OHLC, past or future, from within a chart



PureBytes Links

Trading Reference Links

Attached is a 32-bit ProSuite 2000i compatible dll allowing access on a
chart to any bar's OHLC in the past or future. Unzip the files into your
c:\omega\prog directory and enjoy.

I've included portions of the readme file below for your installation
convenience. Unfortunately, I can't make the source code available yet due
to pending contractual commitments with a publisher.

warmest regards,
Kimberly

>>>>>>>>>>>>>>>> excerpts from the readme.txt file >>>>>>>>>>>>>>>>>>>

readme.txt - AnyOHLC DLL provides access within a chart to any bar's OHLC,
in the past or future
Lightworks Consulting grants you a non-exclusive, non-transferable license
to use
the DLL for educational, non-commercial purposes only.

Nov 28, 2000

DLL Version 1.0.0.1

Platforms
---------
The DLL has been tested with Tradestation 2000i Service pack 5.

Files Included
--------------
AnyOHLC.dll	- the dll
readme.txt	- this file
AnyOHLC.ela	- an example indicator

Other Files Necessary
----------
elkit32.dll	- this DLL is provided by Omega Research as part of the ProSuite
2000i package


Installation
-----------
1. Copy all files to a new directory or the c:/omega/prog directory.
The dll needs to be in a PATH, either create a new path to this
directory you just created or copy it to windows or the
omega/prog directory. Make sure the DefineDllFunc commands in
your indicators have the correct path.

2. Using the EasyLanguage PowerEditor, import the AnyOHLC.ela file, thus
creating the indicator  _indAnyOHLC. The text for the indicator is:

	{ _indAnyOHLC - a test indicator that calls a dll to obtain past/future
bar's OHLC}
	Var: nOpen(0), nHigh(0), nLow(0), nClose(0);

	if CurrentBar = 1 then
	begin
		DefineDLLFunc: "c:\omega\prog\ANYOHLC.DLL", int, "MYOPEN", multiple;
		DefineDLLFunc: "c:\omega\prog\ANYOHLC.DLL", int, "MYHIGH", multiple;
		DefineDLLFunc: "c:\omega\prog\ANYOHLC.DLL", int, "MYLOW", multiple;
		DefineDLLFunc: "c:\omega\prog\ANYOHLC.DLL", int, "MYCLOSE", multiple;
	end;

	{in call to MYXXXX, the 2nd arg is the offset: +n implies bars past,}
	{ -n implies n bar in the future}
	{if a a reference is made to an invalid bar, i.e. -1 when on
LastbarOnChart,}
	{then the MYxxxx functions return a -1 value }

	if CurrentBar = 2 then
	begin
		{look up all values for next bar}
		nOpen = (MYOPEN((LPLONG)&Open,(int) -2)) / PRICESCALE;
		nHigh = (MYHIGH((LPLONG)&High,(int) -2)) / PRICESCALE;
		nLow = (MYLOW((LPLONG)&Low,(int) -2)) / PRICESCALE;
		nClose = (MYCLOSE((LPLONG)&Close,(int) -2)) / PRICESCALE;

		Value99 = Text_New(Date, Time, Close, "2nd bar after this has OHLC = " +
			"O: " + NumToStr(nOpen, 2) + ", " +
			"H: " + NumToStr(nHigh, 2) + ", " +
			"L: " + NumToStr(nLow, 2) + ", " +
			"C: " + NumToStr(nClose, 2) );
	end;


3. Apply the _indAnyOHLC indicator to any chart. The indicator will display
a textual message on Bar 2  showing the OHLC settings for the bar 2 bars in
the future, in this case, bar 4.

Any bar offset, past or future, may be displayed following the standard
Omega research standard of  using a +n offset for past and -n offset for
future.

>>>>>>>>>>>>>>>> end >>>>>>>>>>>>>>>>>>>

Attachment: Description: "AnyOHLC.zip"