Skip to content

Instantly share code, notes, and snippets.

View marketcalls's full-sized avatar

Marketcalls marketcalls

View GitHub Profile
@marketcalls
marketcalls / Buy Today and Sell at Next Day Open.afl
Created September 1, 2018 15:32
Buy Today and Sell at Next Day Open
_SECTION_BEGIN("Buy Today and Sell at Next Day Open");
SetTradeDelays(0,0,0,0);
Buy = timenum() ==151559;
Sell = TimeNum() == 092959;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
@marketcalls
marketcalls / Price Action and Trend line Breakout Scanner.afl
Created July 22, 2018 17:11
Amibroker Price Action and Trend line Breakout Scanner
//Coded by Rajandan R - Founder Marketcalls , Co-Founder www.traderscafe.in
//Coded on 17th July 2018
//Instructions - While Exploration chartid of the trendlinecharts has to be
//mentioned in the parameters section. Else exploration with throw empty output.
_SECTION_BEGIN("Price Action & Trendline Breakout Exploration AFL");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
@marketcalls
marketcalls / Price with LTP Line Marker.afl
Created July 4, 2018 11:04
Price with LTP Line Marker
//Coded by Rajandran R
//Founder of www.marketcalls.in
//Co-Founder - www.traderscafe.in
_SECTION_BEGIN("Price with LTP Line Marker");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
@marketcalls
marketcalls / Equity Drawdown - Marketcalls
Created June 3, 2018 08:42
Equity Drawdown - Marketcalls
////////////////////////////////////////////////////////////
// Copyright by Rajandran R v1.0 03/06/2018
// Website : www.marketcalls.in
////////////////////////////////////////////////////////////
study(title="Equity Drawdown - Marketcalls")
Eq=close
MaxEQ = Eq > MaxEQ[1] ? Eq : nz(MaxEQ[1], Eq)
DD = 100 * ( Eq - MaxEQ ) / MaxEQ
MaxDD = DD < MaxDD[1] ? DD : nz(MaxDD[1], DD)
@marketcalls
marketcalls / Previous Day High Low Breakout Trading System.afl
Last active October 19, 2023 20:11
Previous Day High Low Breakout Trading System
//Coded by Rajandran R (Founder of Marketcalls and Co-Founder of Traderscafe.in
//Website : www.marketcalls.in
//Date : 16 Apr 2018
_SECTION_BEGIN("Simple Trading System - Previous Day High Low Breakout");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat(EncodeColor( colorGold) + "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
SetChartOptions(0,chartShowArrows|chartShowDates);
@marketcalls
marketcalls / Onetimeframing Against Initial Balance.afl
Created March 4, 2018 07:20
Onetimeframing Against Initial Balance – Intraday Trading Strategy Amibroker AFL Code
_SECTION_BEGIN("Price");
//Coded by Rajandran R - Founder Marketcalls.in and Co-founder Traderscafe.in (Co-working Space for Active Traders in Bangalore)
//Coded on 4th Dec 2017
//Concept Adopted from Market Profile
/*
Buy - When Initial Balance direction is up (First Three Bars turns green) and price starts one timeframing down (consecutive 4 or 5 bars (30min) making consecutive lower high then look for a potential target towards the test of day high.
Short - When Initial Balance direction is down (First three bars turns red) and price starts one timeframing up (consecutive 4 or 5 bars (30min) making consecutive higher lows then look for a potential target towards the test of day low.
@marketcalls
marketcalls / Intraday Volume Profile Distribution
Created July 1, 2017 10:39
Intraday Volume Profile Distribution
//Coded by Rajandran R
//Author - Marketcalls
//Date : 01st Jan 2017
_SECTION_BEGIN("Intraday Volume Profile Distribution");
SetChartOptions(0,chartShowArrows|chartShowDates);
// Implementation of Intraday Volume Ladder Distribution overlay using PriceVolDistribution and low-level graphics
bi = BarIndex();
@marketcalls
marketcalls / NinjaAscii.afl
Last active November 30, 2019 04:57
Export Amibroker Data to Ninjatrader EOD or 1min ASCII format
//Coded By Paris Kamal
//Coder - www.marketcalls.in
//Date : 12th Jul 2017
_SECTION_BEGIN("Export Amibroker Data to Ninjatrader EOD or 1min ASCII format");
path = "C:\\amidata\\";
Filter = 1;
symbol_name = StrReplace(StrReplace(Name(),"N.",""),"-I.NFO","");
data_format = ParamToggle("format","Daily|Minute",defaultval=0);
@marketcalls
marketcalls / Expected Move - Amibroker AFL Code
Created June 6, 2017 09:09
Expected Move - Amibroker AFL Code
//Coded by Rajandran R
//Website : www.marketcalls.in
//Date : 5th June 2017
_SECTION_BEGIN("Expected Move");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N( Symbol1= ParamStr("ATM Straddle CE", "NIFTY17JUN9650CE.NFO") );
@marketcalls
marketcalls / Backtesting Basics - EMA Crossover Trading System
Created May 4, 2017 18:31
Backtesting Basics - EMA Crossover Trading System
//Marketcalls Backtesting Tutorial
_SECTION_BEGIN("EMA Crossover Trading System");
SetChartOptions(0,chartShowArrows|chartShowDates);
//Plot CandleSticks
Plot( C, "Price", ParamColor( "Color", colorDefault ), ParamStyle( "Style", styleCandle, maskPrice ) );
//Compute EMA 20 and EMA50