Global/G is a object with some global methods.

Sleep

G.Sleep(Interval: Any) => No Return

G.Sleep(5000);
// The program will sleep for 5 seconds
// If Interval <= 0, will automatic execute Es[i].AutoSleep()

Log

G.Log(Message: Any) => No Return

G.Log("I'm running…");
// Send a message to web control

LogProfit

G.LogProfit(Profit: Number, Message: Any) => No Return

G.LogProfit(12.345, "Round 1 end");
// Send a profit message to web control to show profit chart

LogStatus

G.LogStatus(Message: Any) => No Return

G.LogStatus("Latest BTC Ticker: ", E.GetTicker("BTC"));
// Send a status message to web control to show it real-time

AddTask

G.AddTask(Function: Function, Arguments: Any) => Boolean

// Work with G.ExecTasks()

ExecTasks

G.ExecTasks() => Array

G.AddTask(E.GetAccount);
G.AddTask(E.GetTicker, "BTC");
// Send a task to task-list
var results = G.ExecTasks();
// Execute all tasks at the same time and return all results
var thisAccount = results[0];
var thisTicker = results[1];

results matching ""

    No results matching ""