Skip to content

Instantly share code, notes, and snippets.

MT4Server API

MT4Server is a REST API proxy between brokers who support MetaTrader4 platform. It provides such operations as listing of orders, buy and sell, balanse and ways to obtain ticker data via HTTP or web sockets(obtains a particular ticker from a broker).

It uses API key for authentication and JWT.

Supported platforms

AVA Trade
ICMarkets
FXOpen

package mailer
/**
* Created by spectrum on 5/14/2018.
*/
class Mail(from: String, to: String)
object send {
def a(mail: Mail) = ???
package mailer
/**
* Created by spectrum on 5/14/2018.
*/
class Mail(from: String, to: String)
object send {
def a(mail: Mail) = ???
/**
* Created by spectrum on Jun, 2018
*/
object BigIntFactorial {
implicit def enhanceBigInt(n: BigInt) = new {
private val One = BigInt(1)
def ! = (One /: (One to n)) (_ * _)
}
val Zero = BigInt(0)
import sys
import os
import re
import shutil
import math
import openpyxl
import numpy as np
import matplotlib
from pyhocon import ConfigFactory
from pyhocon.config_tree import ConfigTree
@amuradyan
amuradyan / Aurebeshize.js
Created November 3, 2018 19:59
A Google Chrome bookmarklet that converts all the english to aurebesh on a page
// In order for this to work you need the AurebeshWC font
// You can download it from here - https://goo.gl/yaNc3K
//
// Uncomment all lines below this and store it as a bookmarklet
// javascript:(
function() {
var p=document.getElementsByTagName("*")
for (i=0; i<p.length; i++)
from datetime import datetime
from math import ceil
import calendar
def dates(d1: datetime, d2: datetime) -> list:
middle = []
for year in range(d1.year, d2.year):
middle.append(datetime(year, 12, 31))
@amuradyan
amuradyan / Scala .gitignore
Last active August 22, 2019 15:34 — forked from owainlewis/.gitignore
Scala gitignore
*.class
*.log
# sbt specific
.cache/
.history/
.lib/
dist/*
target/
lib_managed/
@amuradyan
amuradyan / հմմմ.java
Created December 28, 2019 11:00
հմմմ
((ClassType)((com.sun.tools.javac.code.Symbol)((com.sun.tools.javac.code.Scope.Entry[])((com.sun.tools.javac.code.Scope.ScopeImpl)((com.sun.tools.javac.code.Symbol.PackageSymbol)((JCTree.JCCompilationUnit)cu).packge).members_field).table)[2].sym).type).supertype_field
// If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
// Find the sum of all the multiples of 3 or 5 below 1000.
void doShit() {
Integer currentValue = 1;
Integer acc = 0;
while(currentValue < 1000) {
boolean imot = ((currentValue / 3) == (currentValue / 3.0));
boolean imof = ((currentValue / 5) == (currentValue / 5.0));