Need Help on RSI and Chart

Hi All,
I am very new to the AFL programming.

I am trying to find the RSI in last bar cross the value 65 and not crossed 70 (Either you can say want to filter the stocks between RSI in last candle RSI between 65 to 70 same for lower side between 30 to 35). I want to put this values in exploration...

BuyPossiblersi= (r > 65 AND (r >65 AND r<70));
SellPossiblersi = (r < 35 AND (r >30 AND r< 35));

But when i did the testing get the in correct stocks...

I refereed below topic.

Thank you in advance.


@rajibmishra, Welcome to the forum.

Here are a few things to do as a new member...

Also, you need to register on the AB site your forum name. Search for "verified badge" to see how to do this.

Show us what you are doing - your code - and let us know what is not giving you the result that you want or expect. Also, when posting code, please use the code blocks (</>) as it makes it much easier for us to try your code.

We need the code to see how we can help.

HI @snoopy.pa30
Thank you lot for replying to my message.

I did not started yet anything but going to start.
My plan to filter all the stocks those RSI started from 30 and reached 60 to 65, So i can enter some trade. My idea to mark with a horizontal line of candle when it reached 65 so that I can do further analysis on it.

r = RSI( period );
BuyPossiblersi= (r > 30 AND (r >65  AND r<70));
SellPossiblersi =  (r < 70 AND (r >30 AND r< 35)); 

After getting this I want to create column in exploration as well as per the tutorial provided.

Hope this helps. Requesting you to please help on below things.

  1. Mark the Candle when RSI reach between 65 to 70 with horizontal line
  2. Point a arrow mark when price close above EMA 100.



Did you not see this?

Hi @snoopy.pa30
I saw this message, but I am trying with trial version and if it works, then I am going to buy it. Otherwise it will waste for me to invest this much money on software. In past already invested in several software.


@rajibmishra, Thanks for letting us know you are on the Trial. (Better place to put the question would have been in the PreSale/Trial section, then we would not bug you about the "Verified badge").

As a new user, it often takes a while to adjust to thinking in Arrays. Often I tell people to think about it like you were working in Excel. Your array calculation can look at any Row Above (data type - OHLC...) or in any Column to the left (Days of Bars for intraday).

Anyway as a new user, you will have to break down your goal into smaller testable ( code ) pieces.

Here is a start.

// Forum Help
// RSI between 65 and 70

// Doing as an Exploration

Filter = RSI(14)>65 AND RSI(14)<70;  

AddColumn(C, "Close");
AddColumn(RSI(14), "RSI");

This code is an Exploration. I find the Exploration one of the best tools to help debug my code. You can see what results you are getting, and quickly add/remove what you don't want.

The Exploration is part of the Analysis set of tools.

I have given you a first piece, so see if you can build it out a bit to include the lower range as well.

Three suggestions.

  1. Reference the Manual - sometimes a hard thing to understand when learning, but it is ALL there.
  2. READ on this forum - find some key words from the manual, Search for them in the Forum, and Read what people are doing with it.
  3. Post next questions in the Presale/Trial section.

My parting comment... If you can do some programming, AB will be an AMAZING tool for you. It does have a bit of a learning curve, but its' functionality is AMAZING.