Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Building GenAI Applications. 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

49 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. Building GenAI Applications. 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

Fisher Transform – Amibroker AFL Code

The Fisher Transform is a technical analysis indicator developed by John F. Ehlers, designed to identify potential turning points in the price movements of...
Rajandran R
2 min read

My Experience Converting SSL Hybrid from PineScript to Amibroker…

As a trader and coding enthusiast, I often find myself needing to translate trading indicators from one programming language to another. Recently, I embarked...
Rajandran R
8 min read

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
59 sec read

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

Leave a Reply

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