Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

# Download Camarilla AFL code for Amibroker

57 sec read

Camarilla AFL code for amibroker is posted here as per request from one of the regular member of marketcalls (Mr.Veer).

Camarilla AFL code in mainly used by intraday traders and it is used as an alternative to pivot points. And Iam not going much detail into the camarilla and how to trade using it. Just Explaining how the code is built.

Camarilla is basically made up of 8 pivot points. However L3,L4,H3,H4, Pivot Point are considered as the most important levels during intraday especially on 1min/5min charts.

The inputs are taken from the Yesterdays High, Yesterdays Low, Yesterdays Close and Todays Open. And the corresponding data is shown here. In case of Indian market opening time is considered as 9.15a.m(not using pre open levels). All these data are obtained from Daily timeframe though the trade levels are for intraday.

//—- pivot points
DayH = TimeFrameGetPrice(“H”, inDaily, -1); // yesterdays high
DayL = TimeFrameGetPrice(“L”, inDaily, -1); // low
DayC = TimeFrameGetPrice(“C”, inDaily, -1); // close
DayO = TimeFrameGetPrice(“O”, inDaily); // current day open

Camarilla levels are computed using the following formula. Here H3,H4,L3,L4 are used as R3,R4,S3,S4 respectively. Corresponding AFL code is shown below.

// camarilla pivots
if ( True )
{
R = DayH – DayL; // range
PP = (DayH + DayL + DayO + DayO) / 4 ;
R4 = (R * 1.1/2)+DayC;
R3 = (R * 1.1/4)+DayC;
S3 = DayC-(R * 1.1/4);
S4 = DayC- (R * 1.1/2);
}

The code also holds the exploration option to explore camarilla pivots for different stocks at single go.

Camarilla- Amibroker AFL Code
https://gist.github.com/5c7d799186304785a3c23ff9f83f5bf3

Download Camarilla AFL code for Amibroker

Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

## 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...

58 sec read

## 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...

12 min read

## PlaceOrder – Multi Broker Exectuion Code Snippets for Amibroker

This tutorial explains how to build a button trading right from scratch and with a click of a button how you can send orders...

7 min read

## 17 Replies to “Download Camarilla AFL code for Amibroker”

1. veer says:

Dear Rajandran,

Thank you , Thank you , Thank you , Thank you very much.

God bless you.

Regards,

Veer

2. Shahbaz says:

Hi,
Can you pls provide colored rsi for overbought/oversold areas in amibroker

Thx

3. Rajesh says:

Colored RSI

r = RSI(14);
Plot( r, “RSI”, colorBlack );
PlotOHLC( r,r,50,r, “”, IIf( r > 50, colorRed, colorGreen ), styleCloud | styleClipMinMax, 30, 70 );
Plot(30, “Down”, colorGreen, styleDashed);
Plot(70, “Up”, colorRed, styleDashed);

1. Niranjan says:

How can i put this code in amibroker? and at which point?

1. @Niranjan

Download this indicator, unzip it and paste the file in your
c:\program files\amibroker\formulas\custom folder.

Now open your amibroker goto the indicators section and apply the indicator

4. chinmay says:

Respected Sir,

Thank you,

Sir, from last 1/2 months i am using mt4, i want to trade in MCX CRUDE,
can u suggest me any mt4 code for trading with CRUDE

Regards
Chinmay

5. Mahender says:

Thank you for sharing!

6. Rajesh Kanna says:

Respected Sir,
This is Rajesh Kanna i want to know the about RSI. what is the usage that and how do use Please kindly tell me sir .

Regards
Rajesh

7. Rajesh Kanna says:

Sir,
Can you send the colored rsi for overbought/oversold areas in afl amibroker
i want afl link sir
Thx

8. vasudev says:

sir, i am facing problem of wen i use camrilla formulla in amibroker. in day candel levels are ok because it catch settelemnt price in nse future trading, but when i keep intraday chart levels differ as it catch yesterday close (LTP) please guide in formula so that level shuld be same in daily candel as well as intraday chart

9. vinay says:

Dear Rajendran,

Is there a way we can show the camerilla levels only for the latest day. i tried it but no luck yet. Please help

Regards
Vinay

10. Muthukumaran says:

Sir,
I m having a doubt,
the pivot point value calculated for camerilla was
(PDH+PDL+PDC)/3 but
in the afl code for camerilla was
PP = (DayH + DayL + DayO + DayO) / 4 ;
why you are using DayO twice instead of DayC,
Thankx

11. sam cambatta says:

The chart shows only 4 levels , instead of 8 (as mentioned)?

12. Bibin Frederick says:

Hello Sir
Am trading using SAR .Hw can i put it in to AFL Code sir?Plz guide me

13. Venkat says:

Hi

Rajendra

I have request for this camarilla AFL.

Could you add alert code for this? My requirement:

1. I will scan in 5min interval.
2. I should get the allerts in “Alert output” window with sound/without sound for the following conditions:
a. Price nearing the range (buy or sell)
b. Price break out (buy or sell).

I hope it will be possible..

With Gratitude
Venkat

14. duong says:

Hi Rajandran
I have a code in MT4, but I can not use, can you help me to convert to afl ? Plz give me your email, i will send you the file
Thank so much

15. Ignatius Joseph Santra says:

Dear Rajandran,

Thank you for the AFL.

Can you suggest some good AFL for intraday trading.

Thanks once again.

Joseph

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More