Quantcast
Channel: Traderji.com
Viewing all articles
Browse latest Browse all 10287

Please solve this doubt in afl creation?

$
0
0
Hello all,

Anybody help please

In below said code i need the following codes to added in the afl

There should be an exit signal for every entry of buy or sell signal comes to an end.

Should be able to backtest the afl code.

Code:


_SECTION_BEGIN("Price1");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();

sp = Param( "RSI Period", 7, 1, 100 );
r = RSI( sp );
Buy = r > 70;
Sell = r < 30;

shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes(shape, IIf( Buy, colorBrightGreen, colorRed ), 0, IIf( Buy, Low, High ) );

if( ParamToggle("Tooltip shows", "All Values | Only Prices" ) )
{
 ToolTip=StrFormat("Open: %g\nHigh:  %g\nLow:  %g\nClose:  %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));
}
_SECTION_END();

Need the changes as shown in the image


http://postimg.org/image/3z63dpfs3/


Thanks

Sudha

Viewing all articles
Browse latest Browse all 10287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>