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 and Co-Creator of Algomojo (Algorithmic Trading Platform for DIY Traders)

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 and Co-Creator of Algomojo (Algorithmic Trading Platform for DIY Traders)

Plotting Day Wise Equity Curve using Amibroker

We know that Amibroker provides an equity curve for the whole strategy. Is there a way where we can build a simple Day Wise...
Rajandran R
1 min read

Simple Open Range Breakout Trading System with Exploration –…

Opening Range is very often a measure of security high and low generally monitored by breakout traders to gauge the sentiment of the market....
Rajandran R
5 min read

Range Filter – Trading Strategy – Amibroker – Better…

Range Filter is a non-ATR-based trend following strategy inspired by Tradingview Pinescript coder - DonovanWall. According to him, Range Filter is an experimental study...
Rajandran R
4 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