Skip to content

Instantly share code, notes, and snippets.

View smnuman's full-sized avatar
🏠
Working from home

Numan Syed smnuman

🏠
Working from home
View GitHub Profile
@smnuman
smnuman / EOD-Data.afl
Last active January 11, 2023 01:42
The following formula is an AFL collection in AmiBroker library. The Formula is created by `*Barry Scarborough - razzbarry [at] imageview.us*` and detailed as "An indicator that allows dumping large files to C:AmiBackup. It can export EOD or intraday data up to 375,000 Excel lines. Large files, over 65500 lines will be broken into multiple files…
// From: http://www.amibroker.com/library/detail.php?id=1129
// By Barry Scarborough 7/14/2008, updated to handle large files 8/30/08
// #### READ THIS FIRST #### READ THIS FIRST #### READ THIS FIRST #### READ THIS FIRST #### READ THIS FIRST ####
// Export intraday and EOD data to .csv files
// One file for each stock but the symbol name must be a valid Microsoft file name or you will have to modify it, see code below to change name
// if the data exceeds 65500 lines it will be broken into separate files up to 327,500 lines or about 227 days of 24 hour, one minute data
// This will create a directory C:\AmiBackup
// Select your symbols to export with the "Apply to" filter in AA window, to save data base use all symbols and all quotes
// Make sure the chart is on the period you want to save
@smnuman
smnuman / EOD-Data.md
Last active August 22, 2022 13:59
Data Export to a .csv file from AmiBroker database.

#EOD-Data export script Tomasz Janeczko described -- in AmiBroker kb -- a simple way to export AB data to a .csv file.

The easiest way to export quotes to CSV file is to use the below formula from Automatic Analysis window: (Analysis -> Automatic Analysis)

Filter=1; 
AddColumn(O,"Open"); 
AddColumn(H,"High"); 
AddColumn(L,"Low"); 
@smnuman
smnuman / osx_install.sh
Created March 17, 2018 13:19 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@smnuman
smnuman / terminalsize.py
Created January 25, 2018 17:26 — forked from jtriley/terminalsize.py
Get current terminal size on Linux, Mac, and Windows
#!/usr/bin/env python
import os
import shlex
import struct
import platform
import subprocess
def get_terminal_size():
""" getTerminalSize()
#!/usr/bin/env python
import os
import shlex
import struct
import platform
import subprocess
__func = None
def get_terminal_size():
@smnuman
smnuman / encrypted-git-repo.md
Created July 3, 2017 03:22
Transparent Git Encryption

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang (geek@cerias.net). It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].

Description

When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

@smnuman
smnuman / README-Template.md
Created March 22, 2017 17:25 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

_SECTION_BEGIN( "Name" );
SetFormulaName("NMN Chart Stamp");
GfxFont = ParamList("Chosen font", "Tahoma,Monaco,Arial,Times New Roman,Trebuchet MS,",3);
GfxSetOverlayMode( 0 );
GfxSelectFont( GfxFont, Status( "pxheight" ) / 8 );
GfxSetTextAlign( 6 ); // center alignment
GfxSetTextColor( ParamColor("Font color",ColorRGB( 200, 200, 200 )) );
GfxSetBkMode( 0 ); // transparent
GfxTextOut( Name(), Status( "pxwidth" ) / 2, Status( "pxheight" ) / 12 );
GfxSelectFont( GfxFont, Status( "pxheight" ) / 28 );
@smnuman
smnuman / README
Created August 25, 2014 18:14 — forked from Burnfaker/README
THIS IS THE MODIFIED SCRIPT IF YOU LIKE THE ORIGINAL GOTO https://github.com/ilikenwf/apt-fast
====================
About:
====================
apt-fast is a shellscript wrapper for apt-get that can drastically improve apt download
times by downloading packages in parallel, with multiple connections per package.
_SECTION_BEGIN("GIP-3");
/// This whole thing is found and copied here for reference and experiment by Numan on 2014-08-13
/// Original from : http://www.stockmaniacs.net/downloads/afl/gap-finder-plus-gip.afl
/// Details : http://www.stockmaniacs.net/blog/scott-andrews-12-reasons-to-trade-gaps-gap-trading-amibroker-afl/
SetChartOptions(0,chartShowArrows|chartShowDates);
SetChartBkColor(colorGrey50);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Cr = IIf(RSI(9) <= LLV(RSI(9),9) , colorRed , IIf(RSI(9) >=HHV(RSI(9),9) , colorGreen ,IIf(C > O , colorWhite , colorBlack)));
SetBarFillColor( Cr );
Plot( C, "Close", Cr, styleNoTitle | ParamStyle("Style") | GetPriceStyle() );