AFL Help ...

#1
hello friends
nice site, first post from me. need help in AFL "Sun n Cloud" nice AFL but can not do scan or explore. can some one do modification for me. like have an arrow to buy when it turns rising sun and sell when it is dark cloud cover and then ability to scan and explore too,
AFL is like this
_SECTION_BEGIN("Sun&Cloud");
//------------------------------------------------------------------------------
//
// Formula Name: Sun&Cloud
// Author/Uploader: Chih-chiang Chen
// E-mail: [email protected]
// Date/Time Added: 2001-10-26 11:39:51
// Origin: Ichimoku Chart
// Keywords:
// Level: advanced
// Flags: indicator
// Formula URL: http://www.amibroker.com/library/formula.php?id=129
// Details URL: http://www.amibroker.com/library/detail.php?id=129
//
//------------------------------------------------------------------------------
//
// Modification of Ichimoku Chart
//
// For Long term investors and short term traders.
//
//------------------------------------------------------------------------------

/*Sun & Cloud*/
/* Modified from Ichimoku chart by CC Chen*/

Long2 =EMA( ( HHV( H, 20 ) + LLV( L, 20) )/2,20);
Long1 =EMA( ( HHV( H, 5 ) + LLV( L, 5) )/2,10);
K=(H+2*C+L)/4;
Z= ( HHV( H, 3 ) + LLV( L, 3) )/2 ;
SP=IIf(K>=Z*1.05,1.10*Z,IIf(K<Z*1.05 AND K>=Z,1.0*Z,IIf(K<Z,0.9*Z,0.9*Z)));
M=IIf(Long1>long2,Long2,Long1);

MaxGraph = 5;
Graph0=M;
Graph1 = SP;
Graph2=Z;
Graph3=Long2;
Graph4=Long1;

Graph0Style=6;
Graph1Style =8;
Graph2Style=4;
Graph3Style=6;
Graph4Style=6;

Graph0Color=29;
Graph1Color=16;
Graph2Color=5;
Graph3Color=17;
Graph4Color=7;

Title=Name() + "{Sun&Cloud} : "+WriteIf(Long1>long2,"Rising Sun","Dark Cloud Cover");



_SECTION_END();

// Paste the code below to your price chart somewhere and green ribbon means both
// both MACD and ADX trending up so if the red ribbon shows up the MACD and the ADX
// are both trending down.

_SECTION_BEGIN("trending ribbon");
uptrend=PDI()>MDI()AND Signal()<MACD();
downtrend=MDI()>PDI()AND Signal()>MACD();


Plot( 2, /* defines the height of the ribbon in percent of pane width */"ribbon",
IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 0 )), /* choose color */
styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );

_SECTION_END();



thank you guys
 

Similar threads