Skip to content

Instantly share code, notes, and snippets.

View marketcalls's full-sized avatar

Marketcalls marketcalls

View GitHub Profile
@marketcalls
marketcalls / Market Profile.afl
Created December 22, 2014 14:46
Market Profile
_SECTION_BEGIN("Market Profile");
SetChartOptions(0,chartShowArrows|chartShowDates);
GfxSetOverlayMode(0);
GfxSetTextAlign( 6 );// center alignment
GfxSetTextColor( ParamColor("Text Color", ColorHSB( 98, 119, 112 ) ));
GfxSetBkMode(0); // transparent
GfxSelectFont("Verdana", Status("pxheight")/20 );
GfxTextOut( Name(), Status("pxwidth")/2, Status("pxheight")/14 );
GfxSelectFont("Arial", Status("pxheight")/27 );
GfxTextOut( "http://www.justfintech.com", Status("pxwidth")/2, Status("pxheight")/1.15);
@marketcalls
marketcalls / NMA Swing Exploration.afl
Created December 23, 2014 05:40
NMA Swing Exploration
_SECTION_BEGIN("NMA Swing Explorer");
SetBarsRequired(200,0);
GraphXSpace = 5;
SetChartOptions(0,chartShowArrows|chartShowDates);
k = Optimize("K",Param("K",2,0.25,5,0.25),0.25,5,0.25);
Per= Optimize("atr",Param("atr",20,3,20,1),3,20,1);
HACLOSE=(O+H+L+C)/4;
HaOpen = AMA( Ref( HaClose, -1 ), 0.5 );
HaHigh = Max( H, Max( HaClose, HaOpen ) );
@marketcalls
marketcalls / Push Bullet V2.0 .afl
Last active September 19, 2021 13:08
Push Bullet V2.0
//Code by Rajandran R : Date 24th Dec 2014
//Website : www.marketcalls.in
//Copyright : Never Cared about it do whatever you want but dont forget to give relevant credits
_SECTION_BEGIN("PushBullet V2.0");
EnableScript("VBScript");
<%
Public Sub pushbullet(Message_Text)
@marketcalls
marketcalls / Nifty Rollover Statistics.afl
Created December 24, 2014 12:04
Nifty Rollover Statistics
_SECTION_BEGIN("Rollover Statistics");
curr = OpenInt;
prev = Foreign( "NIFTY14DECFUT", "I" );
next = Foreign( "NIFTY15FEBFUT", "I" );
rollover = curr*100/ (prev + curr + next);
Plot(rollover,"Rollover",colorRed);
_SECTION_END();
@marketcalls
marketcalls / Squeeze Momentum Indicator
Last active July 18, 2022 00:53
Squeeze Momentum Indicator
study(shorttitle = "SQZMOM_LB", title="Squeeze Momentum Indicator", overlay=false)
length = input(20, title="BB Length")
mult = input(2.0,title="BB MultFactor")
lengthKC=input(20, title="KC Length")
multKC = input(1.5, title="KC MultFactor")
useTrueRange = input(true, title="Use TrueRange (KC)", type=bool)
@marketcalls
marketcalls / WaveTrend Oscillator
Created January 12, 2015 20:45
WaveTrend Oscillator
//
// @author LazyBear
//
// If you use this code in its original/modified form, do drop me a note.
//
study(title="WaveTrend [LazyBear]", shorttitle="WT_LB")
n1 = input(10, "Channel Length")
n2 = input(21, "Average Length")
obLevel1 = input(60, "Over Bought Level 1")
obLevel2 = input(53, "Over Bought Level 2")
@marketcalls
marketcalls / FX Sniper: T3-CCI
Last active September 19, 2021 10:27
FX Sniper: T3-CCI
////////////////////////////////////////////////////////////
//
// This simple indicator gives you a lot of useful information - when to enter, when to exit
// and how to reduce risks by entering a trade on a double confirmed signal.
// You can use in the xPrice any series: Open, High, Low, Close, HL2, HLC3, OHLC4 and ect...
////////////////////////////////////////////////////////////
study(title="FX Sniper: T3-CCI", shorttitle="T3-CCI")
CCI_Period = input(14, minval=1)
T3_Period = input(5, minval=1)
b = input(0.618)
@marketcalls
marketcalls / Kaufman Moving Average Adaptive
Last active September 19, 2021 10:27
Kaufman Moving Average Adaptive
////////////////////////////////////////////////////////////
//
// Everyone wants a short-term, fast trading trend that works without large
// losses. That combination does not exist. But it is possible to have fast
// trading trends in which one must get in or out of the market quickly, but
// these have the distinct disadvantage of being whipsawed by market noise
// when the market is volatile in a sideways trending market. During these
// periods, the trader is jumping in and out of positions with no profit-making
// trend in sight. In an attempt to overcome the problem of noise and still be
// able to get closer to the actual change of the trend, Kaufman developed an
@marketcalls
marketcalls / Fisher Transform Indicator by Ehlers
Last active December 16, 2022 23:00
Fisher Transform Indicator by Ehlers
////////////////////////////////////////////////////////////
//
// Market prices do not have a Gaussian probability density function
// as many traders think. Their probability curve is not bell-shaped.
// But trader can create a nearly Gaussian PDF for prices by normalizing
// them or creating a normalized indicator such as the relative strength
// index and applying the Fisher transform. Such a transformed output
// creates the peak swings as relatively rare events.
// Fisher transform formula is: y = 0.5 * ln ((1+x)/(1-x))
// The sharp turning points of these peak swings clearly and unambiguously
@marketcalls
marketcalls / smooth RSI
Last active September 19, 2021 10:27
smooth RSI
////////////////////////////////////////////////////////////
//
// This is new version of RSI oscillator indicator, developed by John Ehlers.
// The main advantage of his way of enhancing the RSI indicator is smoothing
// with minimum of lag penalty.
////////////////////////////////////////////////////////////
study(title="Smoothed RSI")
Length = input(10, minval=1)
xValue = (close + 2 * close[1] + 2 * close[2] + close[3] ) / 6
CU23 = sum(iff(xValue > xValue[1], xValue - xValue[1], 0), Length)