AnyOHLC.dll  [SOLVED]

Questions about MultiCharts and user contributed studies.
simon007
Posts: 60
Joined: 12 Apr 2007
Has thanked: 7 times
Been thanked: 1 time

AnyOHLC.dll

Postby simon007 » 04 Nov 2012

Hi @,

I'm looking for AnyOHLC.dll, does anybody knows where you can get this dll?

Best regards,

Simon

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: AnyOHLC.dll  [SOLVED]

Postby ABC » 04 Nov 2012

Hi Simon,

I have never heard of this DLL before, but after searching the net, this is what I found:
Apparently it was posted on traders2traders, which no longer exists, so the documentation is very slim. It was designed as a DLL for TS 2000i, so chances are it will work with MC, too.

I found some code pieces on the TS forum, which are demo systems and provided only as an example and not as a complete trading system. Which means, you shouldn't use it for anything more than an example on how to call the DLLs and not trade it.

Correct me if I'm wrong, but from what I understand you can do the same in MC without this DLL by just using the "symbol_" keywords.

Code: Select all

{Begin Code}
{Make sure "c:\omega\ANYOHLC.DLL" is replaced with the the path you placed the AnyOHLC.dll}

DefineDLLFunc: "c:\omega\ANYOHLC.DLL", int, "MYOPEN", multiple;
DefineDLLFunc: "c:\omega\ANYOHLC.DLL", int, "MYHIGH", multiple;
DefineDLLFunc: "c:\omega\ANYOHLC.DLL", int, "MYLOW", multiple;
DefineDLLFunc: "c:\omega\ANYOHLC.DLL", int, "MYCLOSE", multiple;

Variables: nOpen(0);

nOpen = (MYOPEN((LPLONG)&Open,(int) -1)) / PRICESCALE;

Buy Next Bar at nOpen - 10 Limit;
Sell Short Next bar at NOpen + 10 Limit;

Code: Select all

var: NextOpen(0);

DefineDLLFunc: "c:\program files\TS\program\ANYOHLC.DLL", int, "MYOPEN", multiple;

if date=lastcalcdate then NextOpen=0 else NextOpen=(MYOPEN((LPLONG)&Open,(int) -1)) / PRICESCALE;

if NextOpen>closed(0) and absvalue(NextOpen-closed(0))/closed(0) <.0075 then sell short next bar open;

setprofittarget(absvalue(NextOpen-closed(0))*bigpointvalue+500);
setexitonclose;
As I said I would use the symbol_ keywords or ELCollections maybe, but not knowing what you are trying to do it's hard to give you a good example.

Regards,
ABC
Attachments
AnyOHLC.dll
(32 KiB) Downloaded 505 times

simon007
Posts: 60
Joined: 12 Apr 2007
Has thanked: 7 times
Been thanked: 1 time

Re: AnyOHLC.dll

Postby simon007 » 04 Nov 2012

Hi ABC,

Many thanks for helping me out with such a detailed post and the dll!!
I want to use it to reference future bars, I read on another forum that this is possible with this dll.


Best regards,

Simon

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: AnyOHLC.dll

Postby ABC » 04 Nov 2012

Hi Simon,

you're welcome. You can reference future bars with the symbol_ keywords, too.
Of course future bar meaning a bar that is present on the chart already and is only in the future of the bar you are currently looking at. In case you find a DLL that is able to know tomorrow's high and low already today, please share it with us ;).

To give you an example:

symbol_high[n] will return the high of the specific bar, where the bar you are currently at is n=0. For n > 0 you will go back in time and for n < 0 you will go forward.

Code: Select all

if Date = 1121102 and Time = 1000 then
begin
Print("symbol_time[1]: ", symbol_time[1], "; symbol_high[1]: ", symbol_high[1]);
Print("symbol_time[0]: ", symbol_time[0], "; symbol_high[0]: ", symbol_high[0]);
Print("symbol_time[-1]: ", symbol_time[-1], "; symbol_high[-1]: ", symbol_high[-1]);
end;
On a 30 minute ES chart the print output is this:
symbol_time[1]: 930.00; symbol_high[1]: 1426.50
symbol_time[0]: 1000.00; symbol_high[0]: 1423.25
symbol_time[-1]: 1030.00; symbol_high[-1]: 1421.50
Regards,
ABC

simon007
Posts: 60
Joined: 12 Apr 2007
Has thanked: 7 times
Been thanked: 1 time

Re: AnyOHLC.dll

Postby simon007 » 04 Nov 2012

Hi ABC,

Thanks again, that was exactly what i was looking for.

I let you know when the flux capacitator is finished ;-)

Cheers,

Simon


Return to “MultiCharts”