How do I scan all for RSI(3 day) >85, plus ADX > 50
Harry

You did not specify the period of ADX , I put the same period as RSI

``````S1=Rsi(3)>85 And Adx(3)>50;
S2=iif(s1,1,0);
Plot(s2,"s2",colorRed);
``````
1 Like

2
3 S2=iif(s1,1,0);
4
5 Plot(s2 ,"s2" ,colrRed);

I'm a newbie And an oldie. Thanks again

Struggling still with the Sebastian formula
There are absolutely no results with this formula when I explore back to even 25 years!
S2=iif(s1,1,0);
Plot(s2,"s2",colorRed);

Sebastian can you help again?

@harryzehnwirth What basket of stocks are you looking at. Instead of Plotting a chart you could run an exploration on a watch list, or market and see which and how many stocks meet you criteria.

For example, i just ran your code on the SP500 for on day and got many hits.

Run the exploration with this type of code,

``````Condition = Rsi( 3 ) > 85 And Adx( 3 ) > 50;

///////////////
// Explore
///////////////
Filter = Condition;
AddColumn( Condition, "Condition", 1.0, colorDefault, IIf( Condition, colorGreen, colorDefault ) );

///////////////
// Chart
///////////////
Plot( Condition, "Condition", colorRed, styleHistogram );
``````

And even a quick chart on the SP500 index ETF gives many hits,

2 Likes

Sorry but your request was not clear enough to me
you want to scan one chart only or all of your symbols ?
the formula is used only for one chart
you need to add ( add column ) as in the example of portfoliobuilder
it should work fine with you

Thank you Sebastian.
This helped a lot!
You are clearly the best!!

One last question.
To the above how can I add: volume (20) > 100000 .. ?
where 20 refers to 20 day average volume.

@harryzehnwirth The questions you are asking are fairly introductory and you should spend some time reviewing the resources listed on this previous forum thread as most of the time the members on this forum want to see you put in some effort into learning how to solve your problems,

``````MA(Volume, 20) > 100000
``````

And if you want to put it together with your previous inquiry (and I've added some columns to the Explore to assist you in debugging the formula),

``````Condition = Rsi( 3 ) > 85 And Adx( 3 ) > 50 AND MA(Volume, 20) > 100000 ;

///////////////
// Explore
///////////////
Filter = Condition;
AddColumn( Condition, "Condition", 1.0, colorDefault, IIf( Condition, colorGreen, colorDefault ) );

``````

If you run the S& P500 through that you can get this type of result,

2 Likes

I agree with the statements made by @portfoliobuilder. Working examples are useful teaching tools, but the primary purpose of this area of the forum is to help you learn AFL, not to have others write all your code for you.

Thanks for the compliment , your request was quite easy

for second time in row , portfoliobuilder precede me to the answer so i have nothing to add

BTW many basic formulas are too easy to learn and will not take alot of your time or effort , just give it a try
good luck

Thank you all very much