# Rotation Factor – Amibroker AFL Code

Rotation Factor is a sentimental indicator used in Market Profile to Indicate who is control (Buyers/Sellers) in the market for the day. If the rotational factor prints positive values every day then it mean buyers are in control in the market. Negative Values indicates sellers are in control. Same principle can be applied to investing as well.

How Rotation Factor is Calculated?

1)Rotational Factors Starts with Zero on the first bar

2)In the next bar onwards the Rotational Factor is calculated as shown below

ConditionPoints
Current Bar makes High High and Higher Low+2 points
Current Bar makes Low High and Lower Low-2 Points
Current Bar makes Higher High and Lower Low0 Points
Current Bar makes Lower High and Higher Low0 Points
Curr High and Prev High is Equal and Higher Low+1 Points
Current Bar Makes Higher High but Curr and Pre lows are equal+1 Points
Current Bar Makes Lower High and Current and Prev Equal Lows-1 Points
Current Bar Makes Equal Curr and Prev High and Lower Lows-1 Points

So the rotation factor for each and every bar takes values ranging from +2 to -2. And During the day you should keep tracking of the running (cumulative) total of the rotation factors.

3)cumulatively Rotational Factor is calculated and plotted in 30min timeframe as shown below

https://gist.github.com/c2b4d4aa41385f4bcc6a

Sample Principle Can be applied to Monthly Charts also. Here in this case Rotational Factors Starts with Zero on the first day of the month and varies cumulatively for each and every day.

RCOM Futures – EOD Charts

## Converge Meet 2020 – Preview Webinar Series

I am very much excited to announce the 5th Edition of Converge 2020. This time converge 2020 comes with 5 Days of Virtual Market...

## What is QuantZilla?

Quantzilla is 75+ hours of code mentoring program designed for noncoders who want to learn the coding program right from designing indicators, scanners, trading...

## Things to Consider While Building a Bracket Order Execution…

Building a Bracket Order Strategy is the most demanded request we got from most of the algomojo traders. This article explains the list of...

## 34 Replies to “Rotation Factor – Amibroker AFL Code”

1. amit says:

hello

really good idea. but it doesn’t incorporate spread ( high – low ) and or volume in the above equation .

either spread may be incorporated or diff in consecutive closes may also be incorporated.

also the process of starting every month afresh doesnt seem logical instead ( for eod only ) a better idea would
to specify no of bars like 220 ( for longer term ) and 70 for medium term . and 20 for shorter term in that way the above may be more logical .

rgds

amit

1. Rotation Factor is a concept in Market Profile. You can bend it with your own market experience. There are no rules here!

2. neo269 says:

Is this indicator available for MT4 ? Tx

1. Can be built very easily all one need is time and mql4 knowledge!

3. ravi says:

Hi Rajan,

Do this indicator repaints ?

1. For the current bar it is always recommended to check after bar closing. However it doesn’t repaints for previous bars.

2. You can convert the code the non repainting by modifying the code on line no 69 as

Plot(ref(RF,-1),”Rotational Factor”, IIf(RF>0,colorGreen,colorRed),styleHistogram | stylethick);

4. john says:

Hi, Can you please share any websites where we can view live NSE futures both Index and stock futures charts with technical indicators to analyse? I saw the futures charts in your site as well but there is no option to add technical indicators here and that is why I ask you to refer some other sites as well. Thanks

1. john says:

Thank you. are the charts in the above mentioned link are live or delayed? if delayed then howmuch delay?

2. john says:

Please also provide the link for live NSE and BSE stock charts. Thanks

1. Currently we are providing only EOD charts for NSE Cash and NSE Futures with full historical data. Not BSE as of now. Access EOD charts here

5. john says:

hi, Sorry, you can ignore my previous comment except “Thank you” Because you had already mentioned in your comment that as “… live charts..” I noted it now. Thanks again

1. It is live and updates every 5min.

1. john says:

Hi Thank you.
Could you please guide on creating an afl to scan/explore and plot trendlines and trendline breakout in closing price. It would be of great help if you could guide me on that

6. Manoj says:

Hi Mr.Rajendran,

Iam new to tradin. I have gone through your articles its awsome.Could you please tell me what minute we have to follow in order to understand the Rotational Factor. And if its +2 can we buy from the second candle or vice versa. Could you please give me a reply on this.
Thank You,

Manoj George

1. Manoj says:

1. john says:

Hi I am not able to view Nifty option contracts and stock option contracts. I followed the instructions provided in the charts page but nifty and stock option contracts are not displayed. Please help me in getting the option contract charts. Thanks

1. You can get the Nifty Options and Stock Option Contacts here live marketcalls.in/charts
we are not providing EOD charts at this point.

2. john says:

Hi,
Nifty options contract symbols are not available. You may please check it.

NIFTY15FEB8500CE- This is the format that is suggested in that charts page. But No Nifty options contracts are there. Check for NIFTY15JUL8300CE contract and let me know if you can find it. Or correct me if I am wrong. Thanks in advance

3. john says:

Dear Rajendran, That is how I tried. I am not able to fine the Nifty options charts. If you want I can share the screen shot. I dont know why it is not displaying it for me. Could you please check it again as normal user instead of admin.
I really wonder why it is not displaying it for me.

4. john says:

Hi,
It is working now. Thanks.
I need your guidance on something.
Say based on my analysis I feel if Nifty breakouts @ 8500 it might hit 8600 So here my entry point is 8500 and exit/target is 8600. How to convert this in to option contracts for various strike prices? Hope you get my point.
(This is just an example)

5. john says:

Hi Rajendran,
I have a small doubt in Options Open interest. How to find out howmany number of Longs are in place, howmany number of shorts in place and howmany contracts have been transfered from old buyer/seller to new seller/buyer , by looking at the OI and volume? Is it possible to find out? if so please share how?
Thanks

6. john says:

Hi Yeah I have seen that. It doesnt have information about shorts covered and longs closed

7. john says:

I need your guidance on something.
Say based on my analysis I feel if Nifty breakouts @ 8500 it might hit 8600 So here my entry point is 8500 and exit/target is 8600. How to convert this in to option contracts for various strike prices? Hope you get my point.
(This is just an example)

8. john says:

Hi Rajendran,
Where can we get historical Option contract charts with technical indicators? both lower time like 5 min 30 min and daily, weekly chart. Please through some light. Thanks

9. john says:

Hi Could you please explain about “Long unwinding” with an example. I read about this in internet but I could not find the the meaning of “unwinding” in “Long unwinding” definition. It would be great if you could explain about Long unwinding

Regards

10. Santosh R says:

Sir.. Can you please share the AFL for calculating yday POC and day before yday POC? . Tks for your help

11. anil n kolte says:

hi.sir. i like your ROTATIONAL FACTOR idea very much. it is really very good and dont need any other market study or chart study. it is depend on live rate not on trend. i like it very much. thank you much for giving such idea.