Skip to content

Instantly share code, notes, and snippets.

# Execute it with elevated permissions
# Description:
# This script install automatically the open-ssh feature and enable it
# enable tls1.2 for downloads
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# creating openssh folder and download the zip
mkdir c:\openssh-install
cd c:\openssh-install
@ybagheri
ybagheri / hash.mqh
Created May 17, 2024 18:28 — forked from minhphuc429/hash.mqh
Libraries: JSON Parser MQL4
// $Id: hash.mqh 125 2014-03-03 08:38:32Z ydrol $
#ifndef YDROL_HASH_MQH
#define YDROL_HASH_MQH
//#property strict
/*
This is losely ported from a C version I have which was in turn modified from hashtable.c by Christopher Clark.
Copyright (C) 2014, Andrew Lord (NICKNAME=lordy) <forex@NICKNAME.org.uk>
Copyright (C) 2002, 2004 Christopher Clark <firstname.lastname@cl.cam.ac.uk>
@ybagheri
ybagheri / ChangeTemplate-All.mq4
Last active September 21, 2022 14:37
opens a template on all open charts Metatrader 4 MQ4
//Resource Link : https://www.forexfactory.com/attachment/file/733647?d=1309582301
// How to use:
//see this: https://www.forexfactory.com/attachment/image/4292179?d=1663770637
//then run this script on that chart.
//+------------------------------------------------------------------+
//| ChangeTemplate-All.mq4 |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, zznbrm"
@ybagheri
ybagheri / Create_dynamic_mq4_file_with_php.php
Created September 21, 2022 06:44
Create dynamic mq4 file with php
<?php
$ea[0]=array("magic"=>"14001","pipstep"=>"50","numoftrade"=>"2","tp"=>"10,5","sl"=>"30,10");
$ea[1]=array("magic"=>"14002","pipstep"=>"50","numoftrade"=>"2","tp"=>"15,5","sl"=>"35,20");
$ea[2]=array("magic"=>"14003","pipstep"=>"50","numoftrade"=>"2","tp"=>"20,5","sl"=>"40,20");
$ea[3]=array("magic"=>"14004","pipstep"=>"50","numoftrade"=>"2","tp"=>"25,5","sl"=>"40,21");
$ea[4]=array("magic"=>"14005","pipstep"=>"50","numoftrade"=>"2","tp"=>"30,5","sl"=>"40,22");
$ea[5]=array("magic"=>"14006","pipstep"=>"50","numoftrade"=>"2","tp"=>"40,5","sl"=>"40,23");
$ea[6]=array("magic"=>"14007","pipstep"=>"50","numoftrade"=>"2","tp"=>"50,5","sl"=>"40,24");
$ea[7]=array("magic"=>"14008","pipstep"=>"50","numoftrade"=>"2","tp"=>"60,5","sl"=>"50,30");
@ybagheri
ybagheri / downlaodMeUnrarZip.sh
Created September 20, 2021 08:00
downlaod rar unrar some file zip some of them
# prepare and install tools
sudo su -
sudo yum install epel-release
sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
#install unrar
yum install unrar
@ybagheri
ybagheri / convert.sh
Last active March 28, 2021 09:51
ffmpeg convert FLV to MP4 solve error Could not write header for output file - add text subtitles avi to mkv
## ffmpeg convert FLV to MP4
ffmpeg -i 'input.flv' -vf "scale=2*trunc(iw/2):-2" 'output.mp4'
## add text subtitles avi to mkv
ffmpeg -i 'input.avi' -i subtitles.srt -scodec copy combined.mkv
string VERSION = "TL BO 1.0";
// external global variables
extern int EXT_SWINGS = 2; // swing level, 0 is lowest, 2 is most common
extern int EXT_NO_SWING_LMT = 12; // don't consider the latest X bars as swing points to draw trend lines
extern int EXT_ATR = 300; // ATR(x)
extern double EXT_ATR_MAX_SLOPE = 0.05; // multiple of ATR that would be considered maximum slope
extern double EXT_ATR_BUFFER = 0.05; // multiple of ATR to add to low/high for it to be considered a "touch"
extern int EXT_NULL_CLOSES = 0; // number of closes beyond trend line to nullify it as a valid trend line
extern int EXT_NUM_TOUCHES = 3; // (inclusive) number of touches needed to be considered a valid trend line
@ybagheri
ybagheri / zipunzip.php
Last active October 29, 2020 06:21
zip unzip php
<?php
$zipfile= __DIR__.'/bot.zip';
Zip(__DIR__.'/bot/',$zipfile);
unzip($zipfile, __DIR__.'/a');
function Zip($source, $destination)
{
if (!extension_loaded('zip') || !file_exists($source)) {
@ybagheri
ybagheri / Trader_TA-Lib_php_extension_install.txt
Last active September 16, 2020 17:21
TA-Lib Trader PHP extension A PECL extension in centos 7
# TA-Lib Trader PHP extension A PECL extension in centos 7
sudo su -
sudo yum install epel-release
sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
# To install PECL extensions:
sudo yum install php-devel
@ybagheri
ybagheri / @french_learn_link.php
Created August 12, 2020 04:27
@french_learn french_learn link list of topic url telegram channel