Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, 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. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Long Butterfly Spread – Amibroker AFL code

46 sec read

The Long butterfly spread is a neutral strategy that is a combination of a bull spread and a bear spread. It is a limited profit, limited risk options strategy. There are 3 striking prices involved in a butterfly spread and it can be constructed using calls or puts.

Long Butterfly spread is constructed using Buy 1 ITM Call ,Sell 2 ATM Calls, Buy 1 OTM Call.the long butterfly can be constructed by buying one lower striking in-the-money call, writing two at-the-money calls and buying another higher striking out-of-the-money call. A resulting net debit is taken to enter the trade.

Long Call Butterfly Spread
Butterfly Spread

[wp_ad_camp_5]

 

Payoff Diagram for Long Butterfly Strategy
Long Butterfly

Procedure to Setup Long Butterfly Spread

1.Download Butterfly Spread.afl to Amibroker/Formulas/Options Spread directory
and Unzip the file. Create Options Spread Directory if it doesn’t exist.
2.Open Amibroker->File->Open New Blank Chart
3.Now on the Left Pane goto Charts->Option Spread and drag and drop Bear Iron Condor Spread to the blank chart.
4.Bingo! you got the Spread chart.
5.To Change the spread right click over the charts and goto Parameters where you have control to change the ITM call/put strike A, ATM call/Put Strike B, OTM Call/Put Strike C prices as shown below

Long Butterfly Option Spread Parameters

Supported Strategies
1. Long Call Butterfly
2. Short Call Butterfly

Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, 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. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Line Trading – OpenAlgo Automation Module for Amibroker Users

The line Trading Automation tool is designed for Manual traders who want to perform level-based trade execution faster and also bring some advanced trade...
Rajandran R
55 sec read

Mini Certification Course on Algorithmic Trading

Welcome to the Mini Certification on Algorithmic Trading using Amibroker and OpenAlgo! This comprehensive 4-part series is designed to equip you with the knowledge...
Rajandran R
1 min read

Pivot Reversal Strategy – Tradingview Pinescript to Amibroker AFL…

Pivot Reversal Strategy is a popular in-built strategy in Tradingview Platform. Here I had attempted to convert the pinescript v5 to Amibroker AFL Code....
Rajandran R
3 min read

2 Replies to “Long Butterfly Spread – Amibroker AFL code”

Leave a Reply

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