Skip to content

Instantly share code, notes, and snippets.

View marketcalls's full-sized avatar

Marketcalls marketcalls

View GitHub Profile
@marketcalls
marketcalls / Alligator Trading System
Created November 9, 2014 18:04
Alligator Trading System
//TODO:
//1. Remember F, AO, AC and Zone Add Ons signals and hits
//2. Integrate squat bars with exit signals somehow.
//3. five magic bullets - for taking profit
//Alligator lines
//---------------
//The Blue balance line is where the price would be on this time frame if there were no new incoming information,
//in other words, the market only moves when there is Chaos present.
@marketcalls
marketcalls / Simple Moving Average Crossover
Created November 9, 2014 18:20
Simple Moving Average Crossover
_SECTION_BEGIN("");
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", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("MA5-MA20 Crossover");
Buy = Cross( MA( Close, 5 ), MA( Close, 20 ) );
Sell = Cross( MA( Close, 20 ), MA( Close, 5 ) );
PlotShapes(IIf(Sell==1, shapeDownArrow, shapeNone), colorRed, 0,High, Offset=-15);
@marketcalls
marketcalls / Gist Url
Created November 9, 2014 18:22
Gist Url
//Gist with Username
https://gist.github.com/marketcalls/afb787eaccae0086b084
//Gist without Username
https://gist.github.com/afb787eaccae0086b084
@marketcalls
marketcalls / pushbullet.afl
Last active September 17, 2021 07:46
PushBullet AFL Code
//Coded by Rajandran R : Date 16th Nov 2014
//Website : www.marketcalls.in
//Copyright : Never Cared about it do whatever you want but dont forget to give relevant credits
_SECTION_BEGIN("PushBullet");
EnableScript("VBScript");
<%
@marketcalls
marketcalls / rsi crossover
Created November 18, 2014 12:18
Simple RSI Crossover - Amibroker AFL code
_SECTION_BEGIN("RSI Crossover Alert");
SetChartOptions(0,0,chartGrid30|chartGrid70);
periods = Param( "Periods", 15, 1, 200, 1 );
RS= RSI( periods);
Plot( RS, _DEFAULT_NAME(), colorred, ParamStyle("Style") );
Plot (30, "Oversold", colorGreen,stylethick);
Plot (70, "Overbought", colorRed,stylethick);
buy = Cross(30,RS);
@marketcalls
marketcalls / Plot Vertical Lines
Created November 23, 2014 09:24
Plot Vertical Lines
_SECTION_BEGIN("Plot Vertical Lines");
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() );
StartTime = 092959;
segments = Cross(TimeNum(),StartTime) ;
Plot(segments, "", colorLightGrey, styleHistogram | styleOwnScale );
_SECTION_END();
@marketcalls
marketcalls / Gradient Colors
Created November 23, 2014 11:37
Using Gradient Colors in Amibroker
ibuy = Flip(Buy,Sell);
isell= Flip(Sell,Buy);
Plot(ibuy, "", ColorBlend( colorPaleGreen, colorBlack ), styleGradient | styleHistogram | styleOwnScale );
Plot(isell, "", ColorBlend( colorred, colorBlack ), styleGradient | styleHistogram | styleOwnScale );
@marketcalls
marketcalls / Maual Button Trading
Created November 24, 2014 00:05
Manual Button Trading in Amibroker
Title = " ";
_SECTION_BEGIN("MaualTradingInt1V00 ");
EnableRealTimeControl = ParamList("Enable Controls", "No|Yes", 0);
EnableAutoTrade = ParamList("Enable Autotrade", "No|Yes", 0);
ClientIdValue = ParamStr("Client Id", "CLIENTID");
PurchaseType = ParamList("Transaction Type", "MIS|NRML", 0);
OrderType = ParamList("Order Type", "LIMIT|MARKET", 0);
BuyPriceSelection = ParamList("Buy Price", "Bid Price|Ask Price|LTP", 0);
@marketcalls
marketcalls / Multtimeframe Pattern Scanner
Created November 24, 2014 01:09
Multitimeframe Pattern Scanner
shootingstar = (((H-L)>4*(O-C)) AND ((H-C)/(.001+H-L)>= 0.75) AND ((H-O)/(.001+H-L)>= 0.75));
neardoji = (abs(O-C)<= ((H-L)*0.1));
pattern = WriteIf(shootingstar,"Shooting Star",WriteIf(neardoji ,"Near Doji","N/A"));
for ( i = 1; i <= 30; i++ ) // 1minute to 30minute
{
TimeFrameSet( i * in1Minute );
AddColumn(c,"Ïnterval",1,colorWhite,colorGreen);
@marketcalls
marketcalls / SimplePlugin
Created November 27, 2014 05:40
Simple Plugin using dot net SDK for Amibroker
using System;
using AmiBroker;
using AmiBroker.PlugIn;
using AmiBroker.Utils;
namespace SimplePlugin
{
public class Class1 : IndicatorBase
{
[ABMethod]