Simple Coding Help - No Promise.

pratapvb

Well-Known Member
@ pratap sir

i think ur solution wont work well.
coz condition will always chk for lower high than ema for buy.

wht she needed was no part touching the ema line.

plz go through the code i posted in above post.

i hope i'm right...?
oh ok....till now I got the impression she was looking for pb reversal code as all code said H < ema3 and so on
 

pratapvb

Well-Known Member
Dear All

Just came across this concept on the net.Can this be coded to plot the lines for tomorrow's probable high and low?

Already coded and shared I think as this is demark's day range projection
 

extremist

Well-Known Member
@ amitrandive

here is the code....

even i use to have this but i never found . so i coded fresh for u.


DayO= TimeFrameGetPrice("O", inDaily, -1);
DayH= TimeFrameGetPrice("H", inDaily, -1);
DayL= TimeFrameGetPrice("L", inDaily, -1);
DayC= TimeFrameGetPrice("C", inDaily, -1);

HH=IIf(DayC == DayO,((DayH+DayL+2*DayC)/2)-DayL,IIf(DayC < DayO,((DayH+2*DayL+DayC)/2)-DayL,((2*DayH+DayL+DayC)/2)-DayL));
LL=IIf(DayC == DayO,((DayH+DayL+2*DayC)/2)-DayH,IIf(DayC < DayO,((DayH+2*DayL+DayC)/2)-DayH,((2*DayH+DayL+DayC)/2)-DayH));
PP=IIf(DayC == DayO,((DayH+DayL+2*DayC)/4),IIf(DayC < DayO,((DayH+2*DayL+DayC)/4),((2*DayH+DayL+DayC)/4)));

Plot( PP," \nPivot : ", ParamColor( "Piv Color", colorYellow ), ParamStyle("Style",styleDashed) );
Plot( HH," \nH pred : ", ParamColor( "H Color", colorBrightGreen ), ParamStyle("Style",styleDashed) );
Plot( LL," \nL pred : ", ParamColor( "L Color", colorRed), ParamStyle("Style",styleDashed) );

Enjoy...!
 
Last edited:

amitrandive

Well-Known Member
@ amitrandive

here is the code....

even i use to have this but i never found . so i coded fresh for u.


DayO= TimeFrameGetPrice("O", inDaily, -1);
DayH= TimeFrameGetPrice("H", inDaily, -1);
DayL= TimeFrameGetPrice("L", inDaily, -1);
DayC= TimeFrameGetPrice("C", inDaily, -1);

HH=IIf(DayC == DayO,((DayH+DayL+2*DayC)/2)-DayL,IIf(DayC < DayO,((DayH+2*DayL+DayC)/2)-DayL,((2*DayH+DayL+DayC)/2)-DayL));
LL=IIf(DayC == DayO,((DayH+DayL+2*DayC)/2)-DayH,IIf(DayC < DayO,((DayH+2*DayL+DayC)/2)-DayH,((2*DayH+DayL+DayC)/2)-DayH));
PP=IIf(DayC == DayO,((DayH+DayL+2*DayC)/4),IIf(DayC < DayO,((DayH+2*DayL+DayC)/4),((2*DayH+DayL+DayC)/4)));

Plot( PP," \nPivot : ", ParamColor( "Piv Color", colorYellow ), ParamStyle("Style",styleDashed) );
Plot( HH," \nH pred : ", ParamColor( "H Color", colorBrightGreen ), ParamStyle("Style",styleDashed) );
Plot( LL," \nL pred : ", ParamColor( "L Color", colorRed), ParamStyle("Style",styleDashed) );

Enjoy...!
extremist

Thanks for your help!!!
:clapping:
 
Hi,

I need help in writing an AFL exploration code for finding out the scrips whose Bollinger Band width is minimum in the last 6 months. Right now I am doing this manually with the help of Excel. I am using this code:

D = Sum(Close, 10)/10;
E = D + StDev(Close, 10);
F = D - StDev(Close, 10);
G = E - F;

Filter = 1;

AddColumn(Close, "Price");
AddColumn(G, "G");

In the AA window, in the Range section, I enter "from" and "to" dates and copy the output to Excel, click on column titled "G", click on Sort Ascending, choose "Expand the selection" and sort. Then I click on "Ticker" column, click on Sort Ascending, choose "Expand the selection" and again sort. Then I use "Find" function of Excel to see whether the "To" date I entered in the Range section appears at the top for that scrip or not.

Can anybody please help me to write the code to display the list of scrips in AA window or just flag them with a color?
 

Similar threads