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

RE: [amibroker] backtesting different futures contracts in same portfolio



PureBytes Links

Trading Reference Links

Dimitris,

I am using a Fib formula that requires 3 pivot entries, I have 
reviewed your formulas and am trying to use the line tool for the 
pivots as you have done in your manual fib tool.  I am having no 
success.  Is there a simple way to call or assign studies to the line 
tool? (ie "A" pivot = SU, "B" pivot = RE and "C" pivot = ST).  I am 
limited in my AFL knowledge and can't seem to find simple step by 
step instructions.  Any help you can provide will be appreciated.  
The formula I am using is as follows:

//Double Swing Pivots//

A3=1162.50;//Hi pivot for proj. down & Lo pivot for proj. up//
B3=1084.50;//Int. pivot, Lo pivot for proj dn, Hi pivot for up//
C3=1075.00;//Lo pivot for proj. down, Hi pivot for proj. up//

Plot( Close, "Close", 1, 64); 
Plot(a3,"DP Pivot",8);
Plot(b3,"DP Pivot",8);
Plot(c3,"DP Pivot",2);

xy=IIf(A3>B3,A3-B3,B3-A3);

//Elliott Double Pivot Retracements/Progressions//

DP62=(0.62*xy);dpe62=IIf(a3>b3,C3-dp62,C3+dp62);
DP100=(1.00*xy);dpe100=IIf(a3>b3,C3-dp100,C3+dp100);
DP127=(1.272*xy);dpe127=IIf(a3>b3,C3-dp127,C3+dp127);
DP162=(1.62*xy);dpe162=IIf(a3>b3,C3-dp162,C3+dp162);
DP200=(2.0*xy);dpe200=IIf(a3>b3,C3-dp200,C3+dp200);
DP262=(2.62*xy);dpe262=IIf(a3>b3,C3-dp262,C3+dp262);
DP424=(4.234*xy);dpe424=IIf(a3>b3,C3-dp424,C3+dp424);

Plot(dpe62,"62 DSP",15);
Plot(dpe100,"100 DSP",15);
Plot(dpe127,"127 DSP",15);
Plot(dpe162,"162 DSP",15);
Plot(dpe200,"200 DSP",15);
Plot(dpe262,"262 DSP",15);
Plot(dpe424,"424 DSP",15);

///////////////// PRSI ///////////////

function PRSI(price,eper,wper)
{

Value = EMA( RSI( wper ), eper );
AUC = Wilders( Max( price - Ref( price, -1 ), 0 ), wper );
ADC = Wilders( Max( Ref( price, -1 ) - price, 0 ), wper );
x = ( wper - 1 )*( ADC * Value/(100-Value)-AUC); 
PRSIP = IIf( x >= 0, price + x, price + x*(100-Value)/Value );

return PRSIP;
}

//////////////////////////////////////
//* Ti3 Average *//
function T3(price,periods,s)
{
e1=EMA(price,periods);
e2=EMA(e1,Periods);
e3=EMA(e2,Periods);
e4=EMA(e3,Periods);
e5=EMA(e4,Periods);
e6=EMA(e5,Periods);
c1=-s*s*s;
c2=3*s*s+3*s*s*s;
c3=-6*s*s-3*s-3*s*s*s;
c4=1+3*s+s*s*s+3*s*s;
Ti3=c1*e6+c2*e5+c3*e4+c4*e3;
return ti3;
}
///////////////////////////////////////

//Fast Line//
PSG=PRSI(C,6,9);
pd1=Param("pd1",3,2,500,1);
PSGL=(t3(PSG,pd1,1.10));
Plot(psgl,"",colorBlue,styleThick|styleNoLabel);
//Medium Line//
PSG2=PRSI(C,50,70);
pd2=Param("pd2",4,2,500,1);
PSGL2=(t3(PSG2,pd2,0.7));
Plot(psgl2,"",colorYellow,styleThick|styleNoLabel);


//Trend Confirm Line//
PSGY=PRSI(C,150,100);
pd3=Param("pd3",6,2,500,1);
PSGL=(t3(PSGY,pd3,1.2));
Plot(psgl,"",2,styleThick|styleNoLabel);

//Long term Trend Line//
PSG=PRSI(C,200,250);
pd4=Param("pd4",21,2,500,1);
PSGL=(t3(PSG,pd4,0.70));
Plot(psgl,"",colorRed,styleThick|styleNoLabel);





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
     amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/