Hello,
Simple mathematical
formula for calculation of
basic support and resistance values using zig to identify Tpoints.
Any improvement upon this is most welcome.Thanks.
-- N !!
+++++++++++++++++++++++++++++++++++++
// Simple Math Targets
-Supports/Resistances - Natasha !!
Sen= Param("Zig",5,1,20,1) ;
PeakVal = Peak( H, Sen ) ;
TroughVal = Trough( L, Sen ) ;
Plot(Zig(C,Sen),"
Zig " ,
colorBlue,styleLine) ;
Plot(C," close",colorBlack,64) ;
PivotTop = sqrt (PeakVal);
PivotBottom= sqrt (TroughVal);
ResA = (PivotTop + 1.618) ^ 2 ; //Fib golden ratio(1.618)
ResB = (PivotBottom + 1.618) ^ 2 ;
SupportA = (PivotTop - 1.618) ^ 2 ;
SupportB = (PivotBottom - 1.618) ^ 2 ;
Plot(ResA,"ResTop",colorRed,1);
Plot(ResB,"ResBottom",colorPink,1);
Plot(SupportA,"SupTop",colorBrightGreen,1);
Plot(SupportB,"SupBottom",colorDarkGreen,1);
Filter= 1;
AddColumn(PeakVal,"peak",1.2,colorGreen);
AddColumn(TroughVal,"Trough",1.2,colorRed);
AddColumn(ResA,"ResTop",1.2,colorRed);
AddColumn(ResB,"ResBot",1.2,colorPlum);
AddColumn(SupportA,"SupTop",1.2,colorGreen);
AddColumn(SupportB,"SupBottom",1.2,colorDarkGreen);
++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
YAHOO! GROUPS LINKS
|