Skip to content

Instantly share code, notes, and snippets.

View rubens-shoji's full-sized avatar
🗾
Working from home

Rubens Shoji rubens-shoji

🗾
Working from home
  • Paraná, Brasil
  • 22:42 (UTC -03:00)
View GitHub Profile
@rubens-shoji
rubens-shoji / getPrice.mq5
Created January 2, 2019 12:09
Exemplo usando a classe PositionInfo
// include no topo
#include <Trade\PositionInfo.mqh>
// declaracao no topo
CPositionInfo Position;
// OnInit ou OnTick
Position.SelectByIndex(0);
double Distancia = Position.PriceOpen() - Position.PriceCurrent();
@rubens-shoji
rubens-shoji / envio.js
Created May 10, 2018 13:01
Envio via API JS
var token = 'xxxx';
var headers = {
Authorization: token,
Accept: 'application/json',
'Content-Type': 'application/json',
};
var jsonEnvio = {
"smss":[
{
@rubens-shoji
rubens-shoji / envio.php
Last active May 10, 2018 12:55
Envio em lotes via PHP
<?php
$config = [
'apiv2' => 'http://v2.bestuse.com.br/api/v1/'
];
function makeRequest($url, $jsonData, $method) {
//Initiate cURL.
$ch = curl_init($url);