Error

 Previous Topic Next Topic
 MS Support #1 Posted : Wednesday, June 15, 2022 5:34:18 PM(UTC) Rank: Advanced MemberGroups: Moderators, Registered, Registered Users, SubscribersJoined: 10/8/2010(UTC)Posts: 1,834Thanks: 79 timesWas thanked: 148 time(s) in 144 post(s) Note: .VIX is not available with DataLink. You can replace any .VIX references in the formulas below with VXc1 as needed.Markos Katsanos’ article, “Stock Market Seasonality”, explained a method for trading the market with a hybrid seasonal system. His system employs the VFI indicator Mr. Katsanos introduced in 2004. The formulas below include the code for the VFI.  You must create that indicator first and name it “VFI” and then create the system test. VFI Indicator: name: VFI formula: Code:``````VFIPeriod := 130; Coef:= 0.2; VCoef:= 2.5; inter:= Log( Typical() ) - Log( Ref( Typical(), -1 ) ); Vinter:= Stdev(inter, 30 ); Cutoff:= Coef * Vinter * CLOSE; Vave := Ref( Mov( V, VFIPeriod, S ), -1 ); Vmax := Vave * Vcoef; Vc := Min( V, Vmax ); MF := Typical() - Ref( Typical(), -1 ); VCP := If( MF > Cutoff, VC, If( MF < -Cutoff, -VC, 0 ) ); VFIa := Sum( VCP , VFIPeriod )/Vave; If(BarsSince(Cum(1)>268)>=0, Mov( VFIa, 3, E),0);`````` Seasonal Hybrid System: Buy Order: Code:``````vix:= security("ONLINE:.VIX", C); VFI:= Fml("VFI"); {Optimizations} sellmonth:= opt1; {5 - 8, step 1} vixupmax:= opt2; {50 or 60} crit:= opt3; {15 or 20} k:= opt4; {1.3 - 1.7, step 0.2)} {system calculations} vixdn:= (vix/ref(hhv(vix,25),-1)-1)*100; vixup:= (vix/ref(llv(vix,25),-1)-1)*100; atrdn:= (atr(15)/ref(hhv(atr(15),25),-1)-1)*100; atrup:= (atr(15)/ref(llv(atr(15),25),-1)-1)*100; {buy signal} volcond:= (vixup < vixupmax OR atrup< k*vixupmax) and vfi>crit; (month() >= 10 or month() 2*vixupmax; sellmf:= cross(crit, vfi) and mov(vfi,10,s)
 Wanna join the discussion?! Login to your Discussions forum accountor Register a new forum account.
 Users browsing this topic
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.