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

[amibroker] Siligardos method : Another application



PureBytes Links

Trading Reference Links




Tomorrow will be another day.
Unfortunately it will be an unknown day for 
traders.
 
RSI graph offers support and resistance trendlines, available 
through
<A 
href="">http://www.amibroker.com/library/detail.php?id=103
Since any trendline is already defined from previous 
peaks/troughs as a function of time x, we may always accurately
anticipate/calculate the next bar value, setting 
x=LastValue(Cum(1))+1.
Next bar RSIsupport and Next bar RSIresistance may give the 
equivalent Close support/resistance as an application
to the interesting Siligardos method [TASC June 2003]. Tomasz 
Janeczko has already offered the elegant 
AFL interpretation in the same issue.
Here is the basic AFL code for Indicator Builder.
Next bar RSIsupport and RSIresistance may also be used in AA 
window for interesting explorations
[percentage calculations, breakout conditions 
etc]
Next unknown bar is not that unknown.
Dimitris Tsokakis
 
// Anticipating Next bar Support/Resistance via RSI 
trendlines
// An application of G. Siligardos method
// by D. Tsokakis, June 2003x = Cum(1);
per = 1;// percentage calibration
s1=RSI();s11=RSI();Plot(RSI(),"",2,8);pS = TroughBars( s1, 
per, 1 ) == 0;endt= LastValue(ValueWhen( pS, x, 1 
));startt=LastValue(ValueWhen( pS, x, 2 ));dtS =endt-startt;endS = 
LastValue(ValueWhen( pS, s1, 1 ) );startS = LastValue( ValueWhen( pS, s1, 
2  ));aS = (endS-startS)/dtS;bS = endS;trendlineS = aS * ( 
x  -endt ) + bS; // the support 
equationnextbar=LastValue(Cum(1))+1;nextS=aS * ( nextbar  -endt ) + 
bS; // next bar support Plot(IIf(x>startt-3 AND TRENDLINES>0 AND 
TRENDLINES<100,trendlineS,-1e10),"",IIf(as>0,5,4),1);
pR = PeakBars( s11, per, 1 ) == 0;endt1= 
LastValue(ValueWhen( pR, x, 1 ));startt1=LastValue(ValueWhen( pR, x, 2 
));dtR =endt1-startt1;endR = LastValue(ValueWhen( pR, s11, 1 ) 
);startR = LastValue( ValueWhen( pR, s11, 2  ));aR = 
(endR-startR)/dtR;bR = endR;trendlineR = aR * ( x  -endt1 ) + bR; 
// the resistance equation nextR=aR * ( nextbar  -endt1 ) + bR; // next 
bar resistance
 
Plot(IIf(x>startT1-3  AND TRENDLINER>0 AND 
TRENDLINER<100,trendlineR,-1e10),"",IIf(Ar>0,5,4),1);
 
// apply Siligardos method for the 
nextSValue=nextS;WildPer = 14;ExpPer = 2 * WildPer - 1;AUC = EMA( 
Max( C - Ref( C, -1 ), 0 ), ExpPer );ADC = EMA( Max( Ref( C, -1 ) - C, 0 ), 
ExpPer );x = (WildPer - 1) * ( ADC * Value / (100-Value) - 
AUC);RSIsupport = IIf( x >= 0, C + x, C + x * (100-Value)/Value 
);Title1=Name()+/*", RSIs = "+WriteVal(trendlines,1.2)+" , RSIsn = 
"+WriteVal(nextS,1.2)+*/" , RSIsupport = 
"+WriteVal(RSIsupport,1.2);
 
// apply Siligardos method for 
nextRValue=nextR;WildPer = 14;ExpPer = 2 * WildPer - 1;AUC = EMA( 
Max( C - Ref( C, -1 ), 0 ), ExpPer );ADC = EMA( Max( Ref( C, -1 ) - C, 0 ), 
ExpPer );x = (WildPer - 1) * ( ADC * Value / (100-Value) - 
AUC);RSIresistance = IIf( x >= 0, C + x, C + x * (100-Value)/Value 
);
 
Title=Title1+/*", RSIr = "+WriteVal(trendliner,1.2)+" , 
RSIrn = "+WriteVal(nextR,1.2)+*/", RSIresistance = 
"+WriteVal(RSIresistance,1.2)+",Close = "+WriteVal(C);
 
Uncomment the /*, */ to see more info for the expected 
trendlines values.
See what you may have from the RSI graph in comparison to the 
usual Price trendlines:
** ^VIX has already broken its RSIsupport, a detail not 
visible in the regular Close trendlines.
** DELL RSIsupport/RSIresistance is [31.66-32.59] in 
comparison to Price [29.56-32.51]
** BEAS inescapable breakout !!






Yahoo! Groups Sponsor












Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



Attachment:
RSIsupRes.gif

Attachment: Description: "Description: GIF image"