My afl collection

Status
Not open for further replies.
hi friends,
This is about plotting fibbonacci fann levels in amibroker, is there any way to get the levels to display on the chart just like the retracement levels are shown, can somebody guide please.
thanks.
 
Hello,
Guide me how to code in the amibroker, if the trading call is triggered withing 4 bars it should enter.

I have this MAcd and stoct indicator system
as macd is lagging where as stoct is leading, so simultaneously getting a crossover is difficuly.

So what i want is, if stoct is already in buy, withing 4bars macd also gives a buy trade should be entered.
 
Hello,
Guide me how to code in the amibroker, if the trading call is triggered withing 4 bars it should enter.

I have this MAcd and stoct indicator system
as macd is lagging where as stoct is leading, so simultaneously getting a crossover is difficuly.

So what i want is, if stoct is already in buy, withing 4bars macd also gives a buy trade should be entered.
Any solution for the above query?
 

shivangi77

Well-Known Member
NR7 Screener

NR7 Stock Screener



DOWNLOAD



How to update the data?
You need to follow the steps given under to update the data, to reach the desired results.


1) Download the end of day (EOD) data from National Stock Exchange site (http://www.nse-india.com/)
2)Copy the Stock Symbol, High,Low, and Close data from the downloaded file to the stock screener file, under the respective columns at the end of the file (select the appropriate cell the press Ctrl and Down Arrow to reach the end of file)
3)Then update the Date for current data
4)Once you have copied all the data with date at the end of screener file.You need to use the Filter at the top to sort the data
5)First sort the "Date" column, by using the drop down arrow and select "Sort Newest to Oldest"
6)Then sort the "Symbol" column by selecting "Sort A to Z" option
7)That will complete the process, the screener will show the stock futures which made the NR7 price bar today


To further arrange the data for your convenience you can uncheck previous dates now and select only today's date
Similarly you can uncheck the "Blanks" option, withing NR7 column filter to get specific screened stocks only


A Few things to take care of :
1)Make sure that you always have at least 10 days data in this scanner because the scanner needs that much data to work properly.As you get the new data you can remove the old data so that the file size remains small.
2)Be very careful that date and stocks are arranged as per above steps
3)To check whether you have done all the things correctly.Always refer the stocks range for today it should be the least as compared to past seven days (including today).This should be done with the help of a chart.
4)As always ensure that the high, low data is not erroneous.Ignore the first minute data if you are updating the data manually.
5)The screener currently contains stock futures data as I follow futures only.You can make you own stock price database or track your watchlist only for NR7 Setup



 

sanjn84

Active Member
hi shivangi i came across an ami afl for exploration and scanning of inside day , nr4 and nr7.
hope useful for all of us .

thanks asnavle sir for this afl



_SECTION_BEGIN("NR7");

/*********** NR7 System for Chart and Exploration ***********************/

R = H - L;
NR7 = False;
NR4 = False;
m7 = m4 = idm7 = idm4 = idm = 0;

for(i = 7; i < BarCount; i++)
{
if( R < R[i - 1] AND R < R[i -2] AND R < R[i - 3] AND R < R[i - 4] AND R < R[i - 5] AND R < R[i - 6])
{
NR7 = True;
m7 = 1;
}
}

for(i = 4; i < BarCount; i++)
{
if((R < R[i - 1] AND R < R[i -2] AND R < R[i - 3] ) AND NOT NR7)
{
NR4 = True;
m4 = 1;
}
}
IDNR7 = Inside() * NR7;
IDNR4 = Inside() * NR4;
ID = Inside();
idm7 = IIf(IDNR7, 1, 0);
idm4 = IIf(IDNR4, 1, 0);
idm = IIf(id, 1, 0);

for(i = 1; i < BarCount; i++)
{
if(IDNR7 == IDNR7[i - 1]) idm7 = idm7 + idm7[i - 1];
if(IDNR4 == IDNR4[i - 1]) idm4 = idm4 + idm4[i - 1];
if(NR7 == NR7[i - 1]) m7 = m7 + m7[i - 1];
if(NR4 == NR4[i - 1]) m4 = m4 + m4[i - 1];
if(ID == ID[i - 1]) idm = idm + idm[i - 1];
}

MarkerIDNR7 = MarkerIDNR4 = shapeStar ;

Marker7 = shapeDigit7;
NR7Color = colorBrightGreen;

Marker4 = shapeDigit4;
NR4Color = colorLightOrange;

MarkerID = shapeHollowCircle;
IDColor = colorYellow;

IDNR7Color = colorBrightGreen;
IDNR4Color = colorLightOrange;

MarkerDist = L * 0.995;
IDNRDist = H * 1.03;

if(Status("action") == actionIndicator)
{
_N(Title = StrFormat("{{NAME}}, {{DATE}} ({{INTERVAL}}): {{VALUES}}") + ", Range=" + Prec(R + 0.00001, 2) + ","
+ WriteIf(IDNR7, EncodeColor(colorBrightGreen) + WriteIf(idm7 > 1, StrLeft(NumToStr(idm7), 4), "") + " IDNR7 ", "")
+ WriteIf(IDNR4, EncodeColor(colorLightOrange) + WriteIf(idm4 > 1, StrLeft(NumToStr(idm4), 4), "") + " IDNR4 ", "")
+ WriteIf(NR7 AND NOT ID, EncodeColor(colorBrightGreen) + WriteIf(m7 > 1, StrLeft(NumToStr(m7), 4), "") + " NR7 ", "")
+ WriteIf(NR4 AND NOT ID, EncodeColor(colorLightOrange) + WriteIf(m4 > 1, StrLeft(NumToStr(m4), 4), "") + " NR4 ", "")
+ WriteIf(ID AND NOT NR7 AND NOT NR4, EncodeColor(colorTurquoise) + WriteIf(idm > 1, StrLeft(NumToStr(idm), 4), "") + " Inside Day ", ""));

PlotOHLC(O, H, L, C, "Close", colorLightGrey, styleBar);
PlotShapes(IIf(IDNR7, MarkerIDNR7, shapeNone), IDNR7Color, 0, IDNRDist);
PlotShapes(IIf(IDNR4 AND NOT IDNR7, MarkerIDNR4, shapeNone), IDNR4Color, 0, IDNRDist);
PlotShapes(IIf(NR7 AND NOT ID, Marker7, shapeNone), NR7Color, 0, MarkerDist);
PlotShapes(IIf(NR4 AND NOT NR7 AND NOT ID, Marker4, shapeNone), NR4Color, 0, MarkerDist);
PlotShapes(IIf(ID AND NOT NR7 AND NOT NR4, MarkerID, shapeNone), IDColor, 0, IDNRDist);
}

if(Status("action") == actionExplore)
{
Filter = (m7 > 0) OR (m4 > 0) OR (idm > 0);

SetOption("NoDefaultColumns", True);

AddColumn(DateTime(), "DATE", formatDateTime, colorDefault, colorDefault, 96);
AddTextColumn(Name(), "SYMBOL", 77, colorDefault, colorDefault, 120);
AddColumn(R, "Range", 6.2, colorDefault, colorDefault, 84);
AddColumn(IIf(idm, 48 + idm, 32), "INSIDE", formatChar, colorYellow, IIf(idm, colorLightBlue, colorDefault));
AddColumn(IIf(m4, 48 + m4, 32), "NR4", formatChar, colorYellow, IIf(m4, colorBlue, colorDefault));
AddColumn(IIf(m7, 48 + m7, 32), "NR7", formatChar, colorYellow, IIf(m7, colorGreen, colorDefault));
}

/************************** END OF AFL CODE *****************************/

_SECTION_END();
 
Status
Not open for further replies.

Similar threads