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

Notification

Icon
Error

Options
Go to last post Go to first unread
pedromalzoni  
#1 Posted : Wednesday, October 12, 2005 12:20:25 AM(UTC)
pedromalzoni

Rank: Newbie

Groups: Registered, Registered Users
Joined: 10/1/2005(UTC)
Posts: 5
Location: Brazil

I'm trying this one on a 1-min chart with 6500 pieces of data and it doesn't plot anything :? . Pls help. Thank you :D . priceType:=3; length:=20; factor:=5; offset:=0; htfData:=ExtFml("PowerPivots.TDataCreate",priceType, factor); ma1:=Mov(htfData, length, S); priceType:=3; length:=20; factor:=15; offset:=0; htfData:=ExtFml("PowerPivots.TDataCreate",priceType, factor); ma2:=Mov(htfData, length, S); priceType:=3; length:=20; factor:=30; offset:=0; htfData:=ExtFml("PowerPivots.TDataCreate",priceType, factor); ma3:=Mov(htfData, length, S); priceType:=3; length:=20; factor:=60; offset:=0; htfData:=ExtFml("PowerPivots.TDataCreate",priceType, factor); ma4:=Mov(htfData, length, S); Ma1Wave:=If(C > ma1, +5, -5); Ma2Wave:=If(C > ma2, +15, -15); Ma3Wave:=If(C > ma3, +30, -30); Ma4Wave:=If(C > ma4, +60, -60); Ma1Wave + Ma2Wave + Ma3Wave + Ma4Wave
henry1224  
#2 Posted : Wednesday, October 12, 2005 1:46:31 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
Here is a formula for Time Average MA priceType:=Input("Price (Open=0 High=1 Low=2 Close=3)", 0, 3, 3); length:=Input("Length", 1, 1000, 20); factor:=Input("TFactor", 0, 1000, 1); offset:=Input("Offset", 0, 1000, 0); Mat:=Input("MA 1=Sim 2=Exp 3=Var 4=Weight 5 =tria 6=Time",1,6,1); htfData:=ExtFml("PowerPivots.TDataCreate",priceType, factor); X:=If(Mat=1, Mov(htfData, length, S),If(Mat=2, Mov(htfData, length, E),If(Mat=3, Mov(htfData, length, VAR),If(Mat=4, Mov(htfData, length, W),If(Mat=5, Mov(htfData, length, TRI), Mov(htfData, length, T)))))); results:=ExtFml("PowerPivots.TDataLocalize", x, factor, offset); results;
henry1224  
#3 Posted : Wednesday, October 12, 2005 1:49:33 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
ExtFml("PowerPivots.TDataLocalize", x, factor, offset) is missing in your formula
pedromalzoni  
#4 Posted : Wednesday, October 12, 2005 4:52:07 AM(UTC)
pedromalzoni

Rank: Newbie

Groups: Registered, Registered Users
Joined: 10/1/2005(UTC)
Posts: 5
Location: Brazil

Thank you Henry, I tried adding DataLocalize (below) but still gives the same error message : "Period value out of range in Mov() function". :? Pls help , I've been trying forever to make this formula work in many ways :D htfData:=ExtFml("PowerPivots.TDataCreate",3, 5); ma1:=Mov(htfData, 20, S); results:=ExtFml("PowerPivots.TDataLocalize", ma1, 5, 0); results; htfData:=ExtFml("PowerPivots.TDataCreate",3, 15); ma2:=Mov(htfData, 20, S); results:=ExtFml("PowerPivots.TDataLocalize", ma2, 15, 0); results; htfData:=ExtFml("PowerPivots.TDataCreate",3, 30); ma3:=Mov(htfData, 20, S); results:=ExtFml("PowerPivots.TDataLocalize", ma3, 30, 0); results; htfData:=ExtFml("PowerPivots.TDataCreate",3, 60); ma4:=Mov(htfData, 20, S); results:=ExtFml("PowerPivots.TDataLocalize", ma4, 60, 0); results; Ma1Wave:=If(C > ma1, +5, -5); Ma2Wave:=If(C > ma2, +15, -15); Ma3Wave:=If(C > ma3, +30, -30); Ma4Wave:=If(C > ma4, +60, -60); Ma1Wave + Ma2Wave + Ma3Wave + Ma4Wave
henry1224  
#5 Posted : Wednesday, October 12, 2005 11:53:14 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
htfData:=ExtFml("PowerPivots.TDataCreate",3, 5); ma1:=Mov(htfData, 20, S); results1:=ExtFml("PowerPivots.TDataLocalize", ma1, 5, 0); htfData:=ExtFml("PowerPivots.TDataCreate",3, 15); ma2:=Mov(htfData, 20, S); results2:=ExtFml("PowerPivots.TDataLocalize", ma2, 15, 0); htfData:=ExtFml("PowerPivots.TDataCreate",3, 30); ma3:=Mov(htfData, 20, S); results3:=ExtFml("PowerPivots.TDataLocalize", ma3, 30, 0); htfData:=ExtFml("PowerPivots.TDataCreate",3, 60); ma4:=Mov(htfData, 20, S); results4:=ExtFml("PowerPivots.TDataLocalize", ma4, 60, 0); Ma1Wave:=If(C > results1, +5, -5); Ma2Wave:=If(C > results2, +15, -15); Ma3Wave:=If(C > results3, +30, -30); Ma4Wave:=If(C > results4, +60, -60); Ma1Wave + Ma2Wave + Ma3Wave + Ma4Wave
pedromalzoni  
#6 Posted : Thursday, October 13, 2005 7:26:27 PM(UTC)
pedromalzoni

Rank: Newbie

Groups: Registered, Registered Users
Joined: 10/1/2005(UTC)
Posts: 5
Location: Brazil

Thank you Henry !!! :D But I'm still getting the same error message: "Period value out of range in Mov() function". Do you get this same error message or is it just me ? :?
Patrick  
#7 Posted : Thursday, October 13, 2005 7:38:36 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)
This means you do not have enough data ... Load more data on your char and try again ... Patrick :mrgreen:
TerminmarktWelt.de  
#8 Posted : Friday, October 21, 2005 9:26:11 PM(UTC)
TerminmarktWelt.de

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 4/8/2005(UTC)
Posts: 21

@pedromalzoni, here's another (working) example for the usage of TDataCreate. The upper chart with 5 min Bars and standard Bressert stochastic, the lower chart with a synthetic 5 min Bressert stochastic on a 1 min chart. Bressert Stochastik Pds:=Input("Periods double stoch",3,100,21); Slw:=Input("Slowing double stoch",1,20,3); trigger:=Input("Trigger Length",1,20,3); A:=Mov((CLOSE-LLV(LOW,Pds))/(HHV(H,pds)-LLV(L,Pds)),Slw,E)*100; DSS:=Mov((A-LLV(A,pds))/(HHV(A,Pds)-LLV(A,Pds)),Slw,E)*100; DSS; Mov(DSS,trigger,S) Bressert Stochastik TDataCreate Pds:=Input("Periods double stoch",3,100,21); Slw:=Input("Slowing double stoch",1,20,3); trigger:=Input("Trigger Length",1,20,3); cFaktor:=Input("Faktor",1,20,5); TDLow:=ExtFml("PowerPivots.TDataCreate",2, cFaktor); TDHigh:=ExtFml("PowerPivots.TDataCreate",1, cFaktor); TDClose:=ExtFml("PowerPivots.TDataCreate",3, cFaktor); nlow:=LLV(TDLow,pds); nhigh:=HHV(tdhigh,pds); A:=Mov((TDClose-nlow)/(nHigh-nlow),Slw,E)*100; a1:=Mov((A-LLV(A,pds))/(HHV(A,Pds)-LLV(A,Pds)),Slw,E)*100; b:=Mov(a1,trigger,S); dss:=ExtFml("PowerPivots.TDataLocalize", a1, cFaktor, 0); dsstrigger:=ExtFml("PowerPivots.TDataLocalize", b, cFaktor, 0); dss;dsstrigger
henry1224  
#9 Posted : Saturday, October 22, 2005 8:43:18 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
Here is the CMO Filtered indicator momu:=If(C>Ref(C,-1),C-Ref(C,-1),0); momd:=If(C<Ref(C,-1),Ref(C,-1)-C,0); A1:=Stdev(momu,100); A2:=Stdev(momd,100); Mup:=If(C-Ref(C,-1)>A1,C-Ref(C,-1),A1); Mdn:=If(Ref(C,-1)-C>A2,Ref(C,-1)-C,A2); Per1:=Input("Length of CMO",5,100,13); Pk:=100*((Sum(Mup,Per1)-Sum(Mdn,Per1)) /(Sum(Mup,Per1)+Sum(Mdn,Per1))); Pk; and here is the version with T Data Create Per1:=Input("Length of CMO",5,100,13); cFactor:=Input("Factor",1,20,5); TDClose:=ExtFml("PowerPivots.TDataCreate",3, cFactor); momu:=If(TDClose>Ref(TDClose,-1),TDClose-Ref(TDClose,-1),0); momd:=If(TDClose<Ref(TDClose,-1),Ref(TDClose,-1)-TDClose,0); A1:=Stdev(momu,100); A2:=Stdev(momd,100); Mup:=If(TDClose-Ref(TDClose,-1)>A1,TDClose-Ref(TDClose,-1),A1); Mdn:=If(Ref(TDClose,-1)-TDClose>A2,Ref(TDClose,-1)-TDClose,A2); Pk:=100*((Sum(Mup,Per1)-Sum(Mdn,Per1)) /(Sum(Mup,Per1)+Sum(Mdn,Per1))); CMFil:=ExtFml("PowerPivots.TDataLocalize", Pk, cFactor, 0); CMFil;
henry1224  
#10 Posted : Sunday, October 23, 2005 2:33:09 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
This allows you to plot the MACD from a higher time frame onto the lower time frame Per1:=Input("Length of Fast MA",3,100,12); Per2:=Input("Length of Slow MA",5,200,26); Per3:=Input("Length of Sig",3,200,9); cFactor:=Input("Factor",1,20,5); TDClose:=ExtFml("PowerPivots.TDataCreate",3, cFactor); MA:=Mov(TDClose,Per1,E)-Mov(TDClose,Per2,E); Sig:=Mov(MA,Per3,E); MA:=ExtFml("PowerPivots.TDataLocalize", MA, cFactor, 0); Sig:= ExtFml("PowerPivots.TDataLocalize", Sig, cFactor, 0); Hist:=MA-Sig; MA; Sig; Hist;
henry1224  
#11 Posted : Sunday, October 23, 2005 3:25:21 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
Plot this on the Price Chart Pricetype can be Open, High, Low, or Close Length is the MA periods Pct is the percent of band Factor is 1 for daily,2 for weekly, 3 monthly,5 for a 5 min chart,10 10 min chart etc Offset is the number of bars to the right Mat is the type of MA 1 is simple, 2 exp and so forth priceType:=Input("Price (Open=0 High=1 Low=2 Close=3)", 0, 3, 3); length:=Input("Length", 1, 1000, 20); Pct:= Input("Percentage Bands?",0.1,10,5); factor:=Input("TFactor", 0, 1000, 1); offset:=Input("Offset", 0, 1000, 0); Mat:=Input("MA 1=Sim 2=Exp 3=Var 4=Weight 5 =tria 6=Time",1,6,1); htfData:=ExtFml("PowerPivots.TDataCreate",priceType, factor); X:=If(Mat=1, Mov(htfData, length, S),If(Mat=2, Mov(htfData, length, E),If(Mat=3, Mov(htfData, length, VAR),If(Mat=4, Mov(htfData, length, W),If(Mat=5, Mov(htfData, length, TRI), Mov(htfData, length, T)))))); TBnd:= X*(1+Pct/100); LBnd:= X*(1-Pct/100); MA:=ExtFml("PowerPivots.TDataLocalize", X, factor, offset); TBnd:=ExtFml("PowerPivots.TDataLocalize", TBnd, factor, offset); LBnd:=ExtFml("PowerPivots.TDataLocalize", LBnd, factor, offset); MA;TBnd;LBnd;
henry1224  
#12 Posted : Tuesday, October 25, 2005 12:36:07 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
factor:=Input("TFactor", 0, 1000, 1); offset:=Input("Offset", 0, 1000, 0); HD:=ExtFml("PowerPivots.TDataCreate",1, factor); LD:=ExtFml("PowerPivots.TDataCreate",2, factor); CD:=ExtFml("PowerPivots.TDataCreate",3, factor); R#2:=((HD+LD+CD)/3) - (2*((HD+LD+CD)/3) - HD) + (2*((HD+LD+CD)/3) - LD); R#1:=2*((HD+LD+CD)/3) - LD; S#1:=2*((HD+LD+CD)/3) - HD; PP:=(HD+LD+CD)/3; S#2:=((HD+LD+CD)/3) - (((2*((HD+LD+CD)/3) - LD)-(2*((HD+LD+CD)/3) - HD))); R#2:=ExtFml("PowerPivots.TDataLocalize", R#2, factor, offset); R#1:=ExtFml("PowerPivots.TDataLocalize", R#1, factor, offset); PP:=ExtFml("PowerPivots.TDataLocalize", PP, factor, offset); S#1:=ExtFml("PowerPivots.TDataLocalize", S#1, factor, offset); S#2:=ExtFml("PowerPivots.TDataLocalize", S#2, factor, offset); R#2;R#1;PP;S#1;S#2;
henry1224  
#13 Posted : Tuesday, October 25, 2005 12:38:37 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
factor:=Input("TFactor", 0, 1000, 1); offset:=Input("Offset", 0, 1000, 0); HD:=ExtFml("PowerPivots.TDataCreate",1, factor); LD:=ExtFml("PowerPivots.TDataCreate",2, factor); CD:=ExtFml("PowerPivots.TDataCreate",3, factor); B1:=2*((HD+LD+CD)/3)-LD; B2:=((HD+LD+CD)/3)+(HD-LD); S1:=2*((HD+LD+CD)/3)-HD; S2:=((HD+LD+CD)/3)-(HD-LD); B2:=ExtFml("PowerPivots.TDataLocalize", B2, factor, offset); B1:=ExtFml("PowerPivots.TDataLocalize", B1, factor, offset); S1:=ExtFml("PowerPivots.TDataLocalize", S1, factor, offset); S2:=ExtFml("PowerPivots.TDataLocalize", S2, factor, offset); B2;B1;S1;S2;
Users browsing this topic
Guest (Hidden)
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.