Skip to content

Instantly share code, notes, and snippets.

View marketcalls's full-sized avatar

Marketcalls marketcalls

View GitHub Profile
@marketcalls
marketcalls / Simple Plugin AFL
Created November 27, 2014 05:45
Simple Plugin Generated AFL
// call the plugin
aPlugInResult = SimplePluginFunc1(Close, 5);
// plot plugin's result
Plot(aPlugInResult, "aPlugInResult", colorRed);
@marketcalls
marketcalls / First DLL Plugin
Created November 27, 2014 05:50
First DLL Plugin using .Net SDK for Amibroker
_SECTION_BEGIN("First DLL Plugin");
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() );
Ma1 = SimplePluginFunc1(C,10);
Plot(Ma1,"Moving Average",colorRed);
_SECTION_END();
@marketcalls
marketcalls / Auto Trading Control for NEST or Now Trading Terminal
Created November 30, 2014 07:24
Auto Trading Control for NEST or Now Trading Terminal
_SECTION_BEGIN("RKR_AutoTrade1V00 ");
Title = " ";
EnableRealTimeControl = ParamList("Enable Controls", "No|Yes", 0);
EnableStrategy = ParamList("Enable Strategy", "No|Yes", 0);
StrategyType = ParamList("StrategyType", "Long/Short|Long|Short", 0);
EnableAutoTrade = ParamList("Enable Autotrade", "No|Yes", 0);
BuyPriceSelection = ParamList("Buy Price", "Bid Price|Ask Price|LTP", 0);
SellPriceSelection = ParamList("Sell Price", "Ask Price|Bid Price|LTP", 0);
ProductType = ParamList("Product Type", "MIS|NRML", 0);
@marketcalls
marketcalls / Replace Strategy
Created November 30, 2014 07:27
Replace Auto Trading Strategy
if(EnableStrategy == "Yes")
{
/*~~~~~~~~~~~~~~~~AutoTrade Strategy~~~~~~~~~~~~~~~~~~~~~~*/
/*
You Have to replace the below code with your strategy
Strictly don't use the bellow Buy/Sell code for real Trading
*/
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
Buy = Cross(MACD(12, 26), Signal(12, 26, 9));
@marketcalls
marketcalls / gist:6d0bc827303faf0cc8b8
Created December 7, 2014 05:58
Export CSV data from Amibroker
fh = fopen( "c://AmiBackup//"+Name()+".csv", "w");
if( fh )
{
fputs( "Ticker,Date,Open,High,Low,Close,Volume
", fh );
y = Year();
m = Month();
d = Day();
//r = Hour();
//e = Minute();
@marketcalls
marketcalls / TV Supertrend.txt
Last active October 17, 2021 05:28
Pine Script for Supertrend
study("Supertrend Marketcalls", overlay = true)
Factor=input(4, minval=1,maxval = 100)
Pd=input(10, minval=1,maxval = 100)
Up=hl2-(Factor*atr(Pd))
Dn=hl2+(Factor*atr(Pd))
@marketcalls
marketcalls / Supertrend V1.0 - Pinescript
Created December 18, 2014 09:42
Supertrend V1.0 - Pinescript
study("Supertrend V1.0 - Marketcalls", overlay = true)
Factor=input(3, minval=1,maxval = 100)
Pd=input(7, minval=1,maxval = 100)
Up=hl2-(Factor*atr(Pd))
Dn=hl2+(Factor*atr(Pd))
@marketcalls
marketcalls / William VIX FIX
Created December 18, 2014 19:46
William VIX FIX - Amibroker AFL Code
_SECTION_BEGIN("William VIX FIX");
WVF = (HHV (Close,22) - Low)/(HHV(Close,22))*100;
Plot(WVF,"William VIX FIX", colorRed);
_SECTION_END();
@marketcalls
marketcalls / N Bar High-Low
Created December 20, 2014 19:21
N Bar High-Low Dots - Amibroker AFL code
/* Done by Rajandran R */
/* Author of www.marketcalls.in */
_SECTION_BEGIN("N Bar High/Low Dots");
SetBarsRequired(100000,0);
GraphXSpace = 15;
SetChartOptions(0,chartShowArrows|chartShowDates);
@marketcalls
marketcalls / Supertrend V3.0.afl
Last active August 7, 2024 09:14
Supertrend Indicator with Buy and Sell Alerts - V3.0
/* Done by Rajandran R */
/* Author of www.marketcalls.in */
/* Date : 10th Dec 2014 */
function GetSecondNum()
{
Time = Now( 4 );
Seconds = int( Time % 100 );
Minutes = int( Time / 100 % 100 );
Hours = int( Time / 10000 % 100 );