Please solve this doubt in afl creation?

hmsanil

Active Member
#1
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
 
Last edited:
#3
what is the meaning of these so many arrows ... at each green arrow you are going to buy a lot ,and at each red arrow you are going to sell a lot .............is it ? explain this in better way to understand
 

hmsanil

Active Member
#4
what is the meaning of these so many arrows ... at each green arrow you are going to buy a lot ,and at each red arrow you are going to sell a lot .............is it ? explain this in better way to understand
No, its not like that. I have not use exrem function in this. that's why so many arrows. I just needed exit symbol, which now i learnt from pratab sir.

This afl is just for learning purpose. RSI indicator cant never be used for day trading.

Thanks

Sudha
 

hmsanil

Active Member
#5
Dear Admin

The purpose of the thread is solved, and i got the solution.
Thanks to pratab sir and traderji.

Please close this thread

thanks

Sudha
 

Similar threads