Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

Camarilla Pivot as Trailing Stop Loss – Amibroker AFL Code

44 sec read

Here is an interesting trading system i would like to share. Generally people use Camarilla as Pivot Point levels for their intraday trading. How about using Camarilla Pivot as Trailing Stop for positional trading. We build this interesting trading system (Prototype) using the concept limit order backtesting. It is a simple long/short breakout trading system with no optimization variables.

Camrilla Pivot as TSL

[wp_ad_camp_5]

 

The Buy/Sell rules are shown below

1)Measure Reference High for Buy Signal – i.e High when the Candle Closes above Camarilla Pivot.
2)Buy on Intraday any time if the price crosses Reference High on Intraday basis

1)Measure Reference Low for Short Signal – i.e Low when the Candle Closes below Camarilla Pivot.
2)Short on Intraday any time if the price crosses Reference low on Intraday basis

So if any sharp spike is coming in and that reference high/low are not taken out then the system will remove such unwanted signals.

Following Video tutorial explains how the Camarilla as Pivot Point Strategy Functions

Camarilla Pivot as Trailing Stop Loss – Amibroker AFL Code

https://gist.github.com/93600fae4b9ca4071228

Download Camarilla Pivot as Trailing Stops

Preferred Timeframe : 15min/Hourly

Strategy is backtestable!

Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in)

[Live Coding Webinar] Build Your First Trading Bridge for…

In this course, you will be learning to build your own trading bridge using Python. This 60-minute session is perfect for traders, Python enthusiasts,...
Rajandran R
1 min read

[Webinar] Understanding and Mitigating Curve Fitting in System Trading

"Understanding and Mitigating Curve Fitting in System Trading"! This dynamic session aims to equip novice to intermediate traders, quantitative analysts, and financial engineers with...
Rajandran R
1 min read

P-Signal Strategy Long Only Strategy – Amibroker AFL Code

This tutorial provides an overview of the P-Signal reversal strategy, a quantitative trading strategy that utilizes statistical parameters and error functions to generate probabilistic...
Rajandran R
2 min read

7 Replies to “Camarilla Pivot as Trailing Stop Loss – Amibroker AFL…”

  1. Hi Rajandaran,
    The code is really useful. Thanks a lot for posting it. I require some afl code through which we can trace multibagger stocks from the nse scrips. Can you plz share me the code and send it to my email id.

  2. Hello Rakendra,
    Please help me on setting pareters for back testing a strategy
    My capital is 50k and I will trade only 1 lot of niftyfo at a time and I don’t want to reinvest profit gained , my broker is angel trade
    Kindly help
    Thank you

  3. Rajandran, While backtesting futures on continuous quotes, how do you take into account the contract expiry?

  4. Hi Rajandran

    Nice AFL and regular using i am supertrend 4.0 Thanks for your support . Please help me I want to add hdfcbankd and icici bank two scrips in single chart window amibroker. Getting no idea on google also. will you please help for it .

    ashok joshi

  5. hi there, nice content!

    just a thought:

    in the code snippet below:
    Buy = ibsignal and H>buylimitprice;
    Short = issignal and L lower low than your buy price, (someone is paying LESS than you, and you can know for sure you did execute yours, because you want to buy paying MORE)
    short -> higher high than your short price (someone is paying MORE than you, and you can know for sure you did execute yours, because you want to sell for LESS than that)

Leave a Reply

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