This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
//| Acceleration.mq4 | | |
//| Copyright 2017, MetaQuotes Software Corp. | | |
//| https://www.mql5.com | | |
//+------------------------------------------------------------------+ | |
#property copyright "Copyright 2017, MetaQuotes Software Corp." | |
#property link "https://www.mql5.com" | |
#property version "1.00" | |
#property strict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void closeAllOpen() { | |
int total = OrdersTotal(); | |
for(int i; i < total; i++) { | |
OrderSelect(0, SELECT_BY_POS); | |
int ticketNumber = OrderTicket(); | |
double price = OrderType() == OP_BUY ? Bid : Ask; | |
OrderClose(ticketNumber, OrderLots(), price, 3); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input double trailingStop | |
void tailStop() { | |
for (int i = 0; i < OrdersTotal(); i++) { | |
OrderSelect(i, SELECT_BY_POS, MODE_TRADES); | |
if (OrderType() == OP_BUY) { | |
if (Bid - OrderOpenPrice() > trailingStop * MarketInfo(NULL, MODE_POINT)) { | |
if (OrderStopLoss() < Bid - trailingStop * MarketInfo(NULL, MODE_POINT) | |
|| (OrderStopLoss() == 0)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//---------declare external input | |
extern double RiskPercent=1; | |
extern double reward_ratio=2; | |
extern int PadAmount=0; | |
extern int CandlesBack=5; double pips; int Oninit() | |
{ // initialize 4digit or 5digit broker setup | |
pips = Point; | |
if (_DIGITS== 5 || _DIGITS == 3) | |
pips *=10; | |
return(INIT_SUCCEEDED); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/manahl/arctic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://sourcemaking.com/design_patterns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get install --yes php5-dev libpcre3-dev gcc make git | |
sudo apt-get isntall --yes php5 php5-fpm | |
git clone --depth=1 git://github.com/phalcon/cphalcon.git | |
cd cphalcon/build | |
sudo ./install | |
sudo echo 'extension=phalcon.so' > /etc/php5/mods-available/phalcon.ini | |
sudo ln -s /etc/php5/mods-available/phalcon.ini /etc/php5/cli/conf.d/phalcon.ini | |
sudo ln -s /etc/php5/mods-available/phalcon.ini /etc/php5/fpm/conf.d/phalcon.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir sample docs tests requirements | |
touch README.rst LICENSE setup.py | |
touch sample/__init__.py sample/core.py sample/helpers.py | |
touch docs/index.rst docs/conf.py | |
touch tests/test_basic.py tests/test_advanced.py | |
touch requirements/production.txt requirements/development.txt requirements/staging.txt | |
ln -s requirements/development.txt requirements.txt | |
virtualenv venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install --yes python python-pip | |
sudo pip install -U pip | |
sudo pip install virtualenv |
NewerOlder