logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
Patrick  
#1 Posted : Thursday, August 4, 2005 5:11:19 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Alright I will had more variable functions to this later but if a few helpfull souls would help debugging/testing it that would be great. 1) Variable Reference Function Here is the syntax : ExtFml("ForumDll.VarRef",Data Array, LoopBack period) For Example: ExtFml("ForumDll.VarRef",O,C) Here I assume Negative close, I will always look back not forward ... 2) Variable HHV Function Here is the syntax : ExtFml("ForumDll.VarHHV",Data Array,periods) For Example: ExtFml("ForumDll.VarHHV",O,C) 3) Variable LLV Function Here is the syntax : ExtFml("ForumDll.VarLLV",Data Array,periods) For Example: ExtFml("ForumDll.VarLLV",O,C) 4) Variable SUM Function Here is the syntax : ExtFml("ForumDll.VarSUM",Data Array,periods) For Example: ExtFml("ForumDll.VarSUM",O,C) 5) Variable HHVBARS Function Here is the syntax : ExtFml("ForumDll.VarHHVBARS",Data Array,periods) For Example: ExtFml("ForumDll.VarHHVBARS",O,C) 6) Variable LLVBARS Function Here is the syntax : ExtFml("ForumDll.VarLLVBARS",Data Array,periods) For Example: ExtFml("ForumDll.VarLLVBARS",O,C) 7) Variable Moving Average Function Here is the syntax : ExtFml("ForumDll.VarMOV",Data Array,periods,Method) For Example: ExtFml("ForumDll.VarLLVBARS",O,C,S) Method available are : Exponential E Simple S Triangle T Weighted W Let me know what you think ---Edited on August 5 th 2005 ---- ---Edited on August 6 th 2005 ---- Added SumVar Function Cleaned up source code and added some error traps. ---Edited on August 6 th 2005 - later that day :D ---- Added VarHHVBARS and VarLLVBARS ---Edited on August 8 th 2005 added Variable Moving average function ---Edited on August 12 th 2005 added Variable RSI, Variable MO, Variable CMO functions Patrick :mrgreen:
hayseed  
#2 Posted : Saturday, August 6, 2005 1:41:26 AM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey patrick..... easy is a relative term.... some of us are still back on version 1..... have mercy on us toddlers, keep those little steps coming.....h
Patrick  
#3 Posted : Saturday, August 6, 2005 4:22:10 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
hey h I just added a baby step :D honestly the dev kit looks tough to use but I think its because the manual that comes with it is not very good ( :oops: I might get in trouble for that one ) ... Once you get the logic it becomes pretty easy to use and manipulate. Patrick :mrgreen:
pumrysh  
#4 Posted : Sunday, August 7, 2005 1:51:39 AM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

Patrick, Thanks for these!! I'll give them a spin. Preston
pumrysh  
#5 Posted : Sunday, August 7, 2005 2:19:48 AM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

Okay gave this puppy a spin. Worked very well. Here's an adaptive indicator using an RSI A:=RSI(14); ExtFml( "ForumDll.VarSUM",C,A)/A I seem to remember g_ showing someone different ways to write a moving average, some using the sum function. This uses one of those ideas to create a simple moving average that changes its lookback based on the value of a RSI(14). Preston
Patrick  
#6 Posted : Sunday, August 7, 2005 4:57:24 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
---Edited on August 6 th 2005 - later that day :D ---- Added VarHHVBARS and VarLLVBARS Functions Thanks for the feedback preston ;) I will try to add the moving average function to this of course ... Patrick :mrgreen:
Patrick  
#7 Posted : Tuesday, August 9, 2005 2:49:43 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Added Variable moving average function. Let me know if there are other variable indicators you think would be usefull. As always I really need people to test this. Thanks Patrick :mrgreen:
pumrysh  
#8 Posted : Tuesday, August 9, 2005 4:19:31 AM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

Patrick, Tested the MA...very, very smooth! Preston
Patrick  
#9 Posted : Tuesday, August 9, 2005 4:22:33 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Thanks Preston :D Would you mind posting it on your board for me? Patrick :mrgreen:
pumrysh  
#10 Posted : Tuesday, August 9, 2005 4:37:00 AM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

Patrick, The formula was the same idea that I posted earlier. A:=RSI(14); X:=ExtFml( "ForumDll.VarMOV",C,A,S); X{end} I noticed that the DLL MA only covered S,T,W,and E. The timeseries, variable, and volume weren't available like the normal MA. Preston
pumrysh  
#11 Posted : Tuesday, August 9, 2005 4:45:04 AM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

Patrick, Just tried the sum dll in the same formula and now I'm getting a division error. preston
Patrick  
#12 Posted : Tuesday, August 9, 2005 2:12:42 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Preston, Do you mean you tried : A:=RSI(14); ExtFml( "ForumDll.VarSUM",C,A)/A And got a division by zero error? If yes then just apply the same trick as usual A:=RSI(14); ExtFml( "ForumDll.VarSUM",C,A)/Max(A,0.0001) Or did the function itself generated the error?
Quote:
I noticed that the DLL MA only covered S,T,W,and E.
Yes I only did the easy stuff :D Do we really need the rest ... Patrick :mrgreen:
pumrysh  
#13 Posted : Tuesday, August 9, 2005 5:25:58 PM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

Patrick, Tried the formula again today and it worked fine...must have been a glitch on my side. I did notice a big difference on the indicators with the MA being much smoother. As far as adding more functions to the MA , variable and volume would seem to be the most useful but the 4 you have is fine. Preston
pumrysh  
#14 Posted : Tuesday, August 9, 2005 11:10:45 PM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

Patrick, Just to show what's possible with these Dll's here an indicator that uses a volatility index for a variable lookback period. Notice that the formula uses both the sum and the MA DLL. I put it up against the packaged metastock indicator and its much smoother. The complete description is in the formula collection. Preston Formula: {Dynamic Momentum Index (DMI)} {written by Preston Umrysh} {This indicator uses Dll software developed by MetaStock Forum Crew} {http://forum.equis.com)} x:=Input("normal ouput=1 Biplolar index=2",1,2,1); Vt:=(Stdev(C,5)/Mov(Stdev(C,5),10,S))*10; Umom:=If(C>Ref(C,-1),C-Ref(C,-1),0); Dmom:=If(C<Ref(C,-1),Ref(C,-1)-C,0); UPS:= ExtFml( "ForumDll.VarSUM", Umom,Vt); DNS:= ExtFml( "ForumDll.VarSUM", Dmom,Vt); SumU:=ExtFml("ForumDll.VarMOV",UPS,Vt,e)/Vt; SumD:=ExtFml("ForumDll.VarMOV",DNS,Vt,e)/Vt; RS:=SumU/SumD; DMnm:=100-(100/(1+RS)); DMIn:=(SumU-SumD)/(SumU+SumD); If(x=1,DMnm,DMin); {end}
Patrick  
#15 Posted : Wednesday, August 10, 2005 1:54:52 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Thanks for the formula that looks interresting, I hope you will keep them coming :D
pumrysh  
#16 Posted : Wednesday, August 10, 2005 4:25:40 AM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

A number of people on the EquisMetastock Yahoo Group have mentioned that they cannot find the download file. If you've gotten to this point in the forum and have not seen the download file, you are not logged in...its at the top of the message list under the very first message. Preston
pumrysh  
#17 Posted : Wednesday, August 10, 2005 5:18:32 AM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

Patrick, I'd like to code one more indicator using the idea behind the DMI and end up with something similar to the Jurik DMX which is just a low lag DMI. In order to do that I need a variable RSI DLL. Can you do that? Thanks, Preston
Patrick  
#18 Posted : Wednesday, August 10, 2005 5:31:22 AM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
I will try,just give mea few days ... Patrick :mrgreen:
pumrysh  
#19 Posted : Wednesday, August 10, 2005 3:25:33 PM(UTC)
pumrysh

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/28/2004(UTC)
Posts: 110

'kay P
Patrick  
#20 Posted : Thursday, August 11, 2005 3:17:37 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
RSI is done, I will quickly add Stochastic and Momentum and then I think that will be it for adaptive indicators. I will then spend some time testing and cleaning/improving the code. Patrick :mrgreen:
Users browsing this topic
Guest (Hidden)
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.