وسائل لوڈ ہو رہے ہیں... لوڈنگ...

لاگ اسٹیٹس

بیک ٹسٹنگ سسٹم یا لائیو ٹریڈنگ پیج کے اسٹیٹس بار میں آؤٹ پٹ کی معلومات۔

لاگ اسٹیٹس ((...msgs)

پیرامیٹرmsgپیداوار کا مواد ہے، اور پیرامیٹرmsgایک سے زیادہ پاس کیا جا سکتا ہے. پی ایس جی غلط تار، نمبر، بول، آبجیکٹ، صف، کسی بھی قسم کے نظام کی طرف سے حمایت کی جیسے null.

function main() {
    LogStatus('This is a general status alert')
    LogStatus('This is a status alert in red font #ff0000')
    LogStatus('This is a multi-line status message \n I am the second line')
}
def main():
    LogStatus('This is a general status alert')
    LogStatus('This is a status alert in red font #ff0000')
    LogStatus('This is a multi-line status message \n I am the second line')
void main() {
    LogStatus("This is a general status alert");
    LogStatus("This is a status alert in red font #ff0000");
    LogStatus("This is a multi-line status message \n I am the second line");
}

یہ آؤٹ پٹ مواد کا رنگ مقرر کرنے کی حمایت کرتا ہے:

function main() {
    var table = {type: 'table', title: 'Position information', cols: ['Column 1', 'Column 2'], rows: [ ['abc', 'def'], ['ABC', 'support color #ff0000']]}
    // JSON serialization with the ` character on both sides, as a complex message format (support tables currently)
    LogStatus('`' + JSON.stringify(table) + '`')                    
    // Table information can also appear in multiple rows
    LogStatus('First line of message\n`' + JSON.stringify(table) + '`\n third line of message')
    // It supports multiple tables at the same time, will be displayed in a group with TAB
    LogStatus('`' + JSON.stringify([table, table]) + '`')
    
    // You can also construct a button in the form, and use the GetCommand strategy to receive the contents of the cmd attribute                                
    var table = { 
        type: 'table', 
        title: 'Position operations', 
        cols: ['Column 1', 'Column 2', 'Action'], 
        rows: [ 
            ['abc', 'def', {'type':'button', 'cmd': 'coverAll', 'name': 'Close out positions'}]
        ]
    }
    LogStatus('`' + JSON.stringify(table) + '`') 
    // Or construct a separate button
    LogStatus('`' + JSON.stringify({'type':'button', 'cmd': 'coverAll', 'name': 'Close out positions'}) + '`') 
    // Customizable button style (bootstrap's button attribute)
    LogStatus('`' + JSON.stringify({'type':'button', 'class': 'btn btn-xs btn-danger', 'cmd': 'coverAll', 'name': 'Close out positions'}) + '`')
}
import json
def main():
    table = {"type": "table", "title": "Position information", "cols": ["Column 1", "Column 2"], "rows": [["abc", "def"], ["ABC", "support color #ff0000"]]}
    LogStatus('`' + json.dumps(table) + '`')
    LogStatus('First line of message\n`' + json.dumps(table) + '`\n third line of message')
    LogStatus('`' + json.dumps([table, table]) + '`')            

    table = {
        "type" : "table", 
        "title" : "Position operations", 
        "cols" : ["Column 1", "Column 2", "Action"], 
        "rows" : [
            ["abc", "def", {"type": "button", "cmd": "coverAll", "name": "Close out positions"}]
        ] 
    }
    LogStatus('`' + json.dumps(table) + '`')
    LogStatus('`' + json.dumps({"type": "button", "cmd": "coverAll", "name": "Close out positions"}) + '`')
    LogStatus('`' + json.dumps({"type": "button", "class": "btn btn-xs btn-danger", "cmd": "coverAll", "name": "Close out positions"}) + '`')
void main() {
    json table = R"({"type": "table", "title": "Position information", "cols": ["Column 1", "Column 2"], "rows": [["abc", "def"], ["ABC", "support color #ff0000"]]})"_json;
    LogStatus("`" + table.dump() + "`");
    LogStatus("First line of message\n`" + table.dump() + "`\n third line of message");
    json arr = R"([])"_json;
    arr.push_back(table);
    arr.push_back(table);
    LogStatus("`" + arr.dump() + "`");            

    table = R"({
        "type" : "table", 
        "title" : "Position operations", 
        "cols" : ["Column 1", "Column 2", "Action"], 
        "rows" : [
            ["abc", "def", {"type": "button", "cmd": "coverAll", "name": "Close out positions"}]
        ] 
    })"_json;
    LogStatus("`" + table.dump() + "`");
    LogStatus("`" + R"({"type": "button", "cmd": "coverAll", "name": "Close out positions"})"_json.dump() + "`");
    LogStatus("`" + R"({"type": "button", "class": "btn btn-xs btn-danger", "cmd": "coverAll", "name": "Close out positions"})"_json.dump() + "`");
}

حالت بار میں ڈیٹا آؤٹ پٹ کا مثال:

function main() {
    var table = {
        type: "table",
        title: "status bar button style",
        cols: ["default", "original", "success", "info", "warning", "danger"], 
        rows: [
            [
                {"type":"button", "class": "btn btn-xs btn-default", "name": "default"},
                {"type":"button", "class": "btn btn-xs btn-primary", "name": "original"},
                {"type":"button", "class": "btn btn-xs btn-success", "name": "success"},
                {"type":"button", "class": "btn btn-xs btn-info", "name": "info"},
                {"type":"button", "class": "btn btn-xs btn-warning", "name": "warning"},
                {"type":"button", "class": "btn btn-xs btn-danger", "name": "danger"}
            ]
        ]
    }
    LogStatus("`" + JSON.stringify(table) + "`")
}
import json
def main():
    table = {
        "type": "table",
        "title": "status bar button style",
        "cols": ["default", "original", "success", "info", "warning", "danger"], 
        "rows": [
            [
                {"type":"button", "class": "btn btn-xs btn-default", "name": "default"},
                {"type":"button", "class": "btn btn-xs btn-primary", "name": "original"},
                {"type":"button", "class": "btn btn-xs btn-success", "name": "success"},
                {"type":"button", "class": "btn btn-xs btn-info", "name": "info"},
                {"type":"button", "class": "btn btn-xs btn-warning", "name": "warning"},
                {"type":"button", "class": "btn btn-xs btn-danger", "name": "danger"}
            ]
        ]
    }
    LogStatus("`" + json.dumps(table) + "`")
void main() {
    json table = R"({
        "type": "table",
        "title": "status bar button style",
        "cols": ["default", "original", "success", "info", "warning", "danger"], 
        "rows": [
            [
                {"type":"button", "class": "btn btn-xs btn-default", "name": "default"},
                {"type":"button", "class": "btn btn-xs btn-primary", "name": "original"},
                {"type":"button", "class": "btn btn-xs btn-success", "name": "success"},
                {"type":"button", "class": "btn btn-xs btn-info", "name": "info"},
                {"type":"button", "class": "btn btn-xs btn-warning", "name": "warning"},
                {"type":"button", "class": "btn btn-xs btn-danger", "name": "danger"}
            ]
        ]
    })"_json;
    LogStatus("`" + table.dump() + "`");
}

یہ اسٹیٹس بار (پرانے بٹن کی ساخت) میں بٹن کنٹرولز ڈیزائن کرنے کے لئے حمایت کرتا ہے:

function main() {
    var table = {
        type: "table",
        title: "Status bar button disable, description function test",
        cols: ["Column 1", "Column 2", "Column 3"], 
        rows: []
    }
    var button1 = {"type": "button", "name": "button1", "cmd": "button1", "description": "This is the first button"}
    var button2 = {"type": "button", "name": "button2", "cmd": "button2", "description": "This is the second button, set to disabled", "disabled": true}
    var button3 = {"type": "button", "name": "button3", "cmd": "button3", "description": "This is the third button, set to enable", "disabled": false}
    table.rows.push([button1, button2, button3])
    LogStatus("`" + JSON.stringify(table) + "`")
}
import json
def main():
    table = {
        "type": "table",
        "title": "Status bar button disable, description function test",
        "cols": ["Column 1", "Column 2", "Column 3"], 
        "rows": []
    }
    button1 = {"type": "button", "name": "button1", "cmd": "button1", "description": "This is the first button"}
    button2 = {"type": "button", "name": "button2", "cmd": "button2", "description": "This is the second button, set to disabled", "disabled": True}
    button3 = {"type": "button", "name": "button3", "cmd": "button3", "description": "This is the third button, set to enable", "disabled": False}
    table["rows"].append([button1, button2, button3])
    LogStatus("`" + json.dumps(table) + "`")
void main() {
    json table = R"({
        "type": "table",
        "title": "Status bar button disable, description function test",
        "cols": ["Column 1", "Column 2", "Column 3"], 
        "rows": []
    })"_json;
    json button1 = R"({"type": "button", "name": "button1", "cmd": "button1", "description": "This is the first button"})"_json;
    json button2 = R"({"type": "button", "name": "button2", "cmd": "button2", "description": "This is the second button, set to disabled", "disabled": true})"_json;
    json button3 = R"({"type": "button", "name": "button3", "cmd": "button3", "description": "This is the third button, set to enable", "disabled": false})"_json;
    json arr = R"([])"_json;
    arr.push_back(button1);
    arr.push_back(button2);
    arr.push_back(button3);
    table["rows"].push_back(arr);
    LogStatus("`" + table.dump() + "`");
}

حالت بار بٹن (پرانے بٹن کی ساخت) کی غیر فعال، وضاحت تقریب مقرر کریں:

function test1() {
    Log("Calling custom functions")
}            

function main() {
    while (true) {
        var table = {
            type: 'table',
            title: 'operation',
            cols: ['column1', 'column2', 'Action'],
            rows: [
                ['a', '1', {
                    'type': 'button',                       
                    'cmd': "CoverAll",                      
                    'name': 'Close out positions'                           
                }],
                ['b', '1', {
                    'type': 'button',
                    'cmd': 10,                              
                    'name': 'Send values'
                }],
                ['c', '1', {
                    'type': 'button',
                    'cmd': _D(),                          
                    'name': 'Calling functions'
                }],
                ['d', '1', {
                    'type': 'button',
                    'cmd': 'test1',       
                    'name': 'Calling custom functions'
                }]
            ]
        }
        LogStatus(_D(), "\n", '`' + JSON.stringify(table) + '`')            

        var str_cmd = GetCommand()
        if (str_cmd) {
            Log("Received interaction data str_cmd:", "type:", typeof(str_cmd), "value:", str_cmd)
            if(str_cmd == "test1") {
                test1()
            }
        }            

        Sleep(500)
    }
}
import json
def test1():
    Log("Calling custom functions")            

def main():
    while True:
        table = {
            "type": "table", 
            "title": "operation", 
            "cols": ["column1", "column2", "Action"],
            "rows": [
                ["a", "1", {
                    "type": "button", 
                    "cmd": "CoverAll",
                    "name": "Close out positions"
                }],
                ["b", "1", {
                    "type": "button",
                    "cmd": 10,
                    "name": "Send values" 
                }], 
                ["c", "1", {
                    "type": "button",
                    "cmd": _D(),
                    "name": "Calling functions" 
                }],
                ["d", "1", {
                    "type": "button",
                    "cmd": "test1",
                    "name": "Calling custom functions" 
                }]
            ]
        }            

        LogStatus(_D(), "\n", "`" + json.dumps(table) + "`")
        str_cmd = GetCommand()
        if str_cmd:
            Log("Received interaction data str_cmd:", "type:", typeof(str_cmd), "value:", str_cmd)
            if str_cmd == "test1":
                test1()
        Sleep(500)
void test1() {
    Log("Calling custom functions");
}            

void main() {
    while(true) {
        json table = R"({
            "type": "table", 
            "title": "operation", 
            "cols": ["column1", "column2", "Action"],
            "rows": [
                ["a", "1", {
                    "type": "button", 
                    "cmd": "CoverAll",
                    "name": "Close out positions"
                }],
                ["b", "1", {
                    "type": "button",
                    "cmd": 10,
                    "name": "Send values" 
                }], 
                ["c", "1", {
                    "type": "button",
                    "cmd": "",
                    "name": "Calling functions" 
                }],
                ["d", "1", {
                    "type": "button",
                    "cmd": "test1",
                    "name": "Calling custom functions" 
                }]
            ]
        })"_json;
        table["rows"][2][2]["cmd"] = _D();
        LogStatus(_D(), "\n", "`" + table.dump() + "`");
        auto str_cmd = GetCommand();
        if(str_cmd != "") {
            Log("Received interaction data str_cmd:", "type:", typeof(str_cmd), "value:", str_cmd);
            if(str_cmd == "test1") {
                test1();
            }
        }
        Sleep(500);
    }
}

کے ساتھ مل کرGetCommand()فنکشن، اسٹیٹس بار بٹن انٹرایکشن فنکشن (پرانے بٹن کی ساخت) کی تعمیر:

function main() {
    var tbl = {
        type: "table",
        title: "operation",
        cols: ["column1", "column2"],
        rows: [
            ["Open position operation", {"type": "button", "cmd": "open", "name": "open position", "input": {"name": "number of open positions", "type": "number", "defValue": 1}}],
            ["Close position operation", {"type": "button", "cmd": "coverAll", "name": "close all positions"}]
        ] 
    }            

    LogStatus(_D(), "\n", "`" + JSON.stringify(tbl) + "`")
    while (true) {
        var cmd = GetCommand()
        if (cmd) {
            Log("cmd:", cmd)
        }
        Sleep(1000)
    }
}
import json            

def main():
    tbl = {
        "type": "table", 
        "title": "operation", 
        "cols": ["column1", "column2"],
        "rows": [
            ["Open position operation", {"type": "button", "cmd": "open", "name": "open position", "input": {"name": "number of open positions", "type": "number", "defValue": 1}}],
            ["Close position operation", {"type": "button", "cmd": "coverAll", "name": "close all positions"}]
        ]
    }            

    LogStatus(_D(), "\n", "`" + json.dumps(tbl) + "`")
    while True:
        cmd = GetCommand()
        if cmd:
            Log("cmd:", cmd)
        Sleep(1000)
void main() {
    json tbl = R"({
        "type": "table", 
        "title": "operation", 
        "cols": ["column1", "column2"],
        "rows": [
            ["Open position operation", {"type": "button", "cmd": "open", "name": "open position", "input": {"name": "number of open positions", "type": "number", "defValue": 1}}],
            ["Close position operation", {"type": "button", "cmd": "coverAll", "name": "close all positions"}]
        ]
    })"_json;            

    LogStatus(_D(), "\n", "`" + tbl.dump() + "`");
    while(true) {
        auto cmd = GetCommand();
        if(cmd != "") {
            Log("cmd:", cmd);
        }
        Sleep(1000);
    }
}

ان پٹ ڈیٹا بھی تعاون یافتہ ہے جب انٹرایکشن کے لئے حالت بار بٹن کی تعمیر، اور انٹرایکشن کے احکامات کی طرف سے قبضہ کر رہے ہیںGetCommand()فنکشن بالآخر. شامل کریںinputاشیاء (پرانے بٹن کی ساخت) حالت بار میں بٹن کنٹرول کے اعداد و شمار کی ساخت میں، مثال کے طور پر شامل کرنے"input": {"name": "number of open positions", "type": "number", "defValue": 1}کرنے کے لئے{"type": "button", "cmd": "open", "name": "open position"}جب بٹن پر کلک کیا جاتا ہے تو ان پٹ باکس کنٹرول کے ساتھ ایک پاپ اپ ظاہر ہو جائے گا (ان پٹ باکس میں ڈیفالٹ قدر 1 ہے، جو کہ ڈیٹا کی طرف سے مقرر کیا جاتا ہےdefValueآپ بٹن کمانڈ کے ساتھ ساتھ بھیجنے کے لئے ڈیٹا درج کرسکتے ہیں۔ مثال کے طور پر ، جب مندرجہ ذیل ٹیسٹ کوڈ چلتا ہے ، "اوپن پوزیشن" بٹن پر کلک کرنے کے بعد ، ان پٹ باکس کے ساتھ ایک پاپ اپ ونڈو پاپ اپ ہوجاتی ہے۔ ان پٹ باکس میں 111 درج کریں اور اوکے پر کلک کریں۔GetCommand()فنکشن اس کے بعد پیغام کو پکڑ لے گا:open:111.

function main() {
    var tbl = {
        type: "table",
        title: "Demonstrate grouping button control",
        cols: ["operation"],
        rows: []
    }

    // Creating a grouping button control structure
    var groupBtn = {
        type: "button",
        cmd: "open",
        name: "open positions",
        group: [
            {"name": "orderType", "description": "下单方式|order type", "type": "selected", "defValue": "market order|pending order"},
            {"name": "tradePrice@orderType==1", "description": "交易价格|trade price", "type": "number", "defValue": 100},
            {"name": "orderAmount", "description": "委托数量|order amount", "type": "string", "defValue": 100},
            {"name": "boolean", "description": "yes/no|boolean", "type": "boolean", "defValue": true}
        ]
    }

    // test button 1
    var testBtn1 = {"type": "button", "name": "button1", "cmd": "button1", "description": "This is the first button."}
    var testBtn2 = {"type": "button", "name": "button2", "cmd": "button2", "description": "This is the second button.", "input": {"name": "number of positions opened", "type": "number", "defValue": 1}}

    // Add groupBtn to tbl
    tbl.rows.push([groupBtn])
    // It supports multiple buttons in a cell of a status bar table, i.e. the data in a cell is an array of button structures: [testBtn1, testBtn2].
    tbl.rows.push([[testBtn1, testBtn2]])

    while (true) {
        LogStatus("`" + JSON.stringify(tbl) + "`", "\n", "The grouping button control can also be set directly on the status bar in addition to being set on the status bar form:", "`" + JSON.stringify(groupBtn) + "`")
        var cmd = GetCommand()
        if (cmd) {
            Log("cmd:", cmd)
        }
        Sleep(5000)
    }
}
import json

def main():
    tbl = {
        "type": "table",
        "title": "Demonstrate grouping button control",
        "cols": ["operation"],
        "rows": []
    }

    groupBtn = {
        "type": "button",
        "cmd": "open",
        "name": "open positions",
        "group": [
            {"name": "orderType", "description": "下单方式|order type", "type": "selected", "defValue": "market order|pending order"},
            {"name": "tradePrice@orderType==1", "description": "交易价格|trade price", "type": "number", "defValue": 100},
            {"name": "orderAmount", "description": "委托数量|order amount", "type": "string", "defValue": 100},
            {"name": "boolean", "description": "yes/no|boolean", "type": "boolean", "defValue": True}
        ]
    }

    testBtn1 = {"type": "button", "name": "button1", "cmd": "button1", "description": "This is the first button."}
    testBtn2 = {"type": "button", "name": "button2", "cmd": "button2", "description": "This is the second button.", "input": {"name": "number of positions opened", "type": "number", "defValue": 1}}

    tbl["rows"].append([groupBtn])
    tbl["rows"].append([[testBtn1, testBtn2]])

    while True:
        LogStatus("`" + json.dumps(tbl) + "`", "\n", "The grouping button control can also be set directly on the status bar in addition to being set on the status bar form:", "`" + json.dumps(groupBtn) + "`")
        cmd = GetCommand()
        if cmd:
            Log("cmd:", cmd)
        Sleep(5000)
void main() {
    json tbl = R"({
        "type": "table", 
        "title": "Demonstrate grouping button control", 
        "cols": ["operation"],
        "rows": []
    })"_json;

    json groupBtn = R"({
        "type": "button", 
        "name": "open positions", 
        "cmd": "open", 
        "group": [
            {"name": "orderType", "description": "下单方式|order type", "type": "selected", "defValue": "market order|pending order"},
            {"name": "tradePrice@orderType==1", "description": "交易价格|trade price", "type": "number", "defValue": 100},
            {"name": "orderAmount", "description": "委托数量|order amount", "type": "string", "defValue": 100},
            {"name": "boolean", "description": "yes/no|boolean", "type": "boolean", "defValue": true}
    ]})"_json;

    json testBtn1 = R"({"type": "button", "name": "button1", "cmd": "button1", "description": "This is the first button."})"_json;
    json testBtn2 = R"({"type": "button", "name": "button2", "cmd": "button2", "description": "This is the second button.", "input": {"name": "number of positions opened", "type": "number", "defValue": 1}})"_json;
    
    tbl["rows"].push_back({groupBtn});
    tbl["rows"].push_back({{testBtn1, testBtn2}});
    
    while(true) {
        LogStatus("`" + tbl.dump() + "`", "\n", "The grouping button control can also be set directly on the status bar in addition to being set on the status bar form:", "`" + groupBtn.dump() + "`");
        auto cmd = GetCommand();
        if(cmd != "") {
            Log("cmd:", cmd);
        }
        Sleep(5000);
    }
}

یہ گروپ بٹن کنٹرولز کے لئے حمایت کرتا ہے (پرانے بٹن کی ساخت)اعداد و شمار کے اندراج کی حمایت کرنے والے حالت بار بٹن(input فیلڈ کا استعمال کرتے ہوئے مقرر). انٹرایکٹو احکامات بالآخر کی طرف سے قبضہ کر رہے ہیںGetCommand()فنکشن. فرق یہ ہے کہ کے ساتھ"group"فیلڈ کی ترتیب، جب بٹن پر کلک کیا جاتا ہے تعامل کو متحرک کرنے کے لئے، صفحے پر پاپ اپ کہ ڈائیلاگ ایک سیٹ پر مشتملگروپان پٹ کنٹرولز کے ایک بار میں اعداد و شمار کے ایک گروپ میں داخل کرنے کے لئے مقرر. کے بارے میں نوٹ کرنے کے لئے چند نکات"group"حالت بار بٹن کنٹرول اور گروپ بٹن کنٹرول کی ساخت میں فیلڈ:

  • کےtypeگروپ میں پراپرٹی صرف مندرجہ ذیل چار اقسام کی حمایت کرتا ہے، اورdefValueپراپرٹی ڈیفالٹ ویلیو ہے۔ selected: ایک ڈراپ ڈاؤن باکس کنٹرول|ایک ڈراپ ڈاؤن باکس میں ہر اختیار کو الگ کرنے کے لئے علامت کے طور پر یہ مقرر کیا جاتا ہے. نومبر: عددی ان پٹ باکس کنٹرول. string: سٹرنگ ان پٹ باکس کنٹرول. boolean: چیک باکس کنٹرول، (بولین) سچ کے لئے چیک کیا، (بولین) غلط کے لئے چیک نہیں کیا.
  • انٹرایکٹو ان پٹ سپورٹ انحصار کی ترتیبات پر کنٹرول: مثال کے طور پر، مندرجہ ذیل مثال میں:"name": "tradePrice@orderType==1"ترتیب، جس سےتجارت قیمتان پٹ کنٹرول صرف اس وقت دستیاب ہے جبآرڈرٹائپڈراپ ڈاؤن کنٹرول ایک کے طور پر منتخب کیا جاتا ہےزیر التوا حکم.
  • Bilingual control name support for interactive inputs دو لسانی کنٹرول ناموں کی حمایت مثال کے طور پر، مندرجہ ذیل مثال میں: description: ایک ہی طریقے سے order type setting, use|علامتوں کو چینی اور انگریزی میں تفصیل کے مواد کو الگ کرنے کے لئے.
  • name, descriptionگروپ میں اورname, descriptionبٹن کی ساخت میں ایک ہی تعریف نہیں ہے اگرچہ وہ ایک ہی فیلڈ کے نام ہیں. کی تعریفnameگروپ میں بھی تعریف سے مختلف ہےnameان پٹ میں.
  • جب گروپ بٹن کنٹرول کو ٹرگر کیا جاتا ہے تو ، تعامل کا مواد بٹن کی cmd فیلڈ ویلیو اور گروپ فیلڈ کے متعلقہ ڈیٹا کی شکل میں بھیجا جاتا ہے ، جیسے آؤٹ پٹLog("cmd:", cmd)مندرجہ ذیل مثال ٹیسٹ میں بیان:cmd: open:{"orderType":1,"tradePrice":99,"orderAmount":"99","boolean":true}، یعنی، کیا واپس کیا جاتا ہےGetCommand()جب ایک تعامل ہوتا ہے تو فنکشن:open:{"orderType":1,"tradePrice":99,"orderAmount":"99","boolean":true}.
  • کےtypeبٹن کنٹرول کی خصوصیت صرف حمایت کرتا ہے:"button". بٹن کنٹرولز جو ان پٹ ڈیٹا کی حمایت کرتے ہیں، یعنی کنٹرولزinputپراپرٹی سیٹ،typeکی ترتیب کی معلومات میں خصوصیاتinputمیدان متعدد کنٹرول اقسام کی حمایت کرتا ہے. مندرجہ ذیل مثالوں کا حوالہ دیں:
function main() {
    // Status bar button control (set input field to implement) testBtn1 button triggered by the page in the drop-down box control using the options field to set options, using the defValue field to set the default options. This is different from the other examples in this chapter, which use defValue to set the options directly.
    var testBtn1 = {
        type: "button",
        name: "testBtn1",
        cmd: "cmdTestBtn1",
        input: {name: "testBtn1ComboBox", type: "selected", options: ["A", "B"], defValue: 1}
    }

    /* 
      Status bar button control (set input field implementation) testBtn2 button triggered by the page in the drop-down box control using the options field to set the options, options field in the options field not only supports the string,
      the use of the ```{text: "description", value: "value"}``` structure is also supported. Use the defValue field to set the default option, which can be multiple choice (multiple choice via array structure). Multiple choice requires setting the additional field multiple to a true value.
    */
    var testBtn2 = {
        type: "button", 
        name: "testBtn2",
        cmd: "cmdTestBtn2",
        input: {
            name: "testBtn2MultiComboBox", 
            type: "selected", 
            description: "Implementing dropdown box multi-selection", 
            options: [{text: "Option A", value: "A"}, {text: "Option B", value: "B"}, {text: "Option C", value: "C"}],
            defValue: ["A", "C"],
            multiple: true
        }
    }

    // Status bar grouping button control (set group field implementation) testBtn3 button triggered by the page in the drop-down box control using the options field to set options, also supports the direct use of defValue set options.
    var testBtn3 = {
        type: "button",                     
        name: "testBtn3",
        cmd: "cmdTestBtn3", 
        group: [
            {name: "comboBox1", label: "labelComboBox1", description: "Dropdown box 1", type: "selected", defValue: 1, options: ["A", "B"]}, 
            {name: "comboBox2", label: "labelComboBox2", description: "Dropdown box 2", type: "selected", defValue: "A|B"}, 
            {name: "comboBox3", label: "labelComboBox3", description: "Dropdown box 3", type: "selected", defValue: [0, 2], multiple: true, options: ["A", "B", "C"]}, 
            {
                name: "comboBox4", 
                label: "labelComboBox4", 
                description: "Dropdown box 4", 
                type: "selected", 
                defValue: ["A", "C"], 
                multiple: true, 
                options: [{text: "Option A", value: "A"}, {text: "Option B", value: "B"}, {text: "Option C", value: "C"}, {text: "Option D", value: "D"}]
            }
        ]
    }
    while (true) {
        LogStatus("`" + JSON.stringify(testBtn1) + "`\n", "`" + JSON.stringify(testBtn2) + "`\n", "`" + JSON.stringify(testBtn3) + "`\n")
        var cmd = GetCommand()
        if (cmd) {
            Log(cmd)
        }
        Sleep(5000)
    }
}
import json

def main():
    testBtn1 = {
        "type": "button",
        "name": "testBtn1",
        "cmd": "cmdTestBtn1",
        "input": {"name": "testBtn1ComboBox", "type": "selected", "options": ["A", "B"], "defValue": 1}
    }

    testBtn2 = {
        "type": "button", 
        "name": "testBtn2",
        "cmd": "cmdTestBtn2",
        "input": {
            "name": "testBtn2MultiComboBox", 
            "type": "selected", 
            "description": "Implementing dropdown box multi-selection", 
            "options": [{"text": "Option A", "value": "A"}, {"text": "Option B", "value": "B"}, {"text": "Option C", "value": "C"}],
            "defValue": ["A", "C"],
            "multiple": True
        }
    }

    testBtn3 = {
        "type": "button",                     
        "name": "testBtn3",
        "cmd": "cmdTestBtn3", 
        "group": [
            {"name": "comboBox1", "label": "labelComboBox1", "description": "Dropdown box 1", "type": "selected", "defValue": 1, "options": ["A", "B"]}, 
            {"name": "comboBox2", "label": "labelComboBox2", "description": "Dropdown box 2", "type": "selected", "defValue": "A|B"}, 
            {"name": "comboBox3", "label": "labelComboBox3", "description": "Dropdown box 3", "type": "selected", "defValue": [0, 2], "multiple": True, "options": ["A", "B", "C"]}, 
            {
                "name": "comboBox4", 
                "label": "labelComboBox4", 
                "description": "Dropdown box 4", 
                "type": "selected", 
                "defValue": ["A", "C"], 
                "multiple": True, 
                "options": [{"text": "Option A", "value": "A"}, {"text": "Option B", "value": "B"}, {"text": "Option C", "value": "C"}, {"text": "Option D", "value": "D"}]
            }
        ]
    }

    while True:
        LogStatus("`" + json.dumps(testBtn1) + "`\n", "`" + json.dumps(testBtn2) + "`\n", "`" + json.dumps(testBtn3) + "`\n")
        cmd = GetCommand()
        if cmd:
            Log(cmd)
        Sleep(5000)
void main() {
    json testBtn1 = R"({
        "type": "button",
        "name": "testBtn1",
        "cmd": "cmdTestBtn1",
        "input": {"name": "testBtn1ComboBox", "type": "selected", "options": ["A", "B"], "defValue": 1}
    })"_json;
    
    json testBtn2 = R"({
        "type": "button", 
        "name": "testBtn2",
        "cmd": "cmdTestBtn2",
        "input": {
            "name": "testBtn2MultiComboBox", 
            "type": "selected", 
            "description": "Implementing dropdown box multi-selection", 
            "options": [{"text": "Option A", "value": "A"}, {"text": "Option B", "value": "B"}, {"text": "Option C", "value": "C"}],
            "defValue": ["A", "C"],
            "multiple": true
        }
    })"_json;
    
    json testBtn3 = R"({
        "type": "button",                     
        "name": "testBtn3",
        "cmd": "cmdTestBtn3", 
        "group": [
            {"name": "comboBox1", "label": "labelComboBox1", "description": "Dropdown box 1", "type": "selected", "defValue": 1, "options": ["A", "B"]}, 
            {"name": "comboBox2", "label": "labelComboBox2", "description": "Dropdown box 2", "type": "selected", "defValue": "A|B"}, 
            {"name": "comboBox3", "label": "labelComboBox3", "description": "Dropdown box 3", "type": "selected", "defValue": [0, 2], "multiple": true, "options": ["A", "B", "C"]}, 
            {
                "name": "comboBox4", 
                "label": "labelComboBox4", 
                "description": "Dropdown box 4", 
                "type": "selected", 
                "defValue": ["A", "C"], 
                "multiple": true, 
                "options": [{"text": "Option A", "value": "A"}, {"text": "Option B", "value": "B"}, {"text": "Option C", "value": "C"}, {"text": "Option D", "value": "D"}]
            }
        ]
    })"_json;
    
    while (true) {
        LogStatus("`" + testBtn1.dump() + "`\n", "`" + testBtn2.dump() + "`\n", "`" + testBtn3.dump() + "`\n");
        auto cmd = GetCommand();
        if (cmd != "") {
            Log(cmd);
        }
        Sleep(5000);
    }
}

جب حالت بار گروپ بٹن کنٹرول (کی ترتیب کی طرف سے لاگوgroupفیلڈ) اور حالت بار بٹن کنٹرول (کی ترتیب کی طرف سے لاگو کیا جاتا ہےinputفیلڈ) پر کلک کیا جاتا ہے تاکہ تعامل کو متحرک کیا جاسکے (پرانا بٹن ڈھانچہ) ، صفحے پر پاپ اپ ہونے والے ڈائیلاگ باکس میں ڈراپ ڈاؤن باکس کنٹرول متعدد انتخابوں کی بھی حمایت کرتا ہے۔ مندرجہ ذیل مثال میں دکھایا گیا ہے کہ متعدد انتخاب کے اختیارات کے ساتھ ڈراپ ڈاؤن باکس کنٹرول کو کس طرح ڈیزائن کیا جائے:

var symbols = ["BTC_USDT.swap", "ETH_USDT.swap", "LTC_USDT.swap", "BNB_USDT.swap", "SOL_USDT.swap"]

function createBtn(tmp, group) {
    var btn = JSON.parse(JSON.stringify(tmp))

    _.each(group, function(eleByGroup) {
        btn["group"].unshift(eleByGroup)
    })

    return btn
}

function main() {
    var arrManager = []

    _.each(symbols, function(symbol) {
        arrManager.push({
            "symbol": symbol,
        })
    })

    // Btn
    var tmpBtnOpen = {
        "type": "button",
        "cmd": "open",
        "name": "Open a position and place an order",
        "group": [{
            "type": "selected",
            "name": "tradeType",
            "label": "Order type",
            "description": "Market order, limit order",
            "default": 0,
            "group": "Trading setup",
            "settings": {
                "options": ["Market order", "Limit order"],
                "required": true,
            }
        }, {
            "type": "selected",
            "name": "direction",
            "label": "Trading direction",
            "description": "Buy, sell",
            "default": "buy",
            "group": "Trading setup",
            "settings": {
                "render": "segment",
                "required": true,
                "options": [{"name": "buy", "value": "buy"}, {"name": "sell", "value": "sell"}],
            }
        }, {
            "type": "number",
            "name": "price",
            "label": "price",
            "description": "The price of the order",
            "group": "Trading setup",
            "filter": "tradeType==1",
            "settings": {
                "required": true,
            }
        }, {
            "type": "number",
            "name": "amount",
            "label": "Order quantity",
            "description": "Order quantity",
            "group": "Trading setup",
            "settings": {
                "required": true,
            }
        }],
    }

    while (true) {
        var tbl = {"type": "table", "title": "dashboard", "cols": ["symbol", "actionOpen"], "rows": []}

        _.each(arrManager, function(m) {
            var btnOpen = createBtn(tmpBtnOpen, [{"type": "string", "name": "symbol", "label": "Trading instruments", "default": m["symbol"], "settings": {"required": true}}])
            tbl["rows"].push([m["symbol"], btnOpen])
        })

        var cmd = GetCommand()
        if (cmd) {
            Log("Receive interaction:", cmd)

            // Parsing interaction messages: open:{"symbol":"LTC_USDT.swap","tradeType":0,"direction":"buy","amount":111}
            // According to the first colon: the previous instruction determines which button template triggers the message
            var arrCmd = cmd.split(":", 2)
            if (arrCmd[0] == "open") {
                var msg = JSON.parse(cmd.slice(5))
                Log("Trading instruments:", msg["symbol"], ", Trading direction:", msg["direction"], ", Order type:", msg["tradeType"] == 0 ? "Market order" : "Limit order", msg["tradeType"] == 0 ? ", Order price: current market price" : ", Order price:" + msg["price"], ", Order quantity:", msg["amount"])
            }
        }

        LogStatus(_D(), "\n", "`" + JSON.stringify(tbl) + "`")
        Sleep(1000)
    }
}
import json

symbols = ["BTC_USDT.swap", "ETH_USDT.swap", "LTC_USDT.swap", "BNB_USDT.swap", "SOL_USDT.swap"]

def createBtn(tmp, group):
    btn = json.loads(json.dumps(tmp))
    for eleByGroup in group:
        btn["group"].insert(0, eleByGroup)
    return btn

def main():
    arrManager = []

    for symbol in symbols:
        arrManager.append({"symbol": symbol})

    # Btn
    tmpBtnOpen = {
        "type": "button",
        "cmd": "open",
        "name": "Open a position and place an order",
        "group": [{
            "type": "selected",
            "name": "tradeType",
            "label": "Order type",
            "description": "Market order, limit order",
            "default": 0,
            "group": "Trading setup",
            "settings": {
                "options": ["Market order", "Limit order"],
                "required": True,
            }
        }, {
            "type": "selected",
            "name": "direction",
            "label": "Trading direction",
            "description": "Buy, sell",
            "default": "buy",
            "group": "Trading Setup",
            "settings": {
                "render": "segment",
                "required": True,
                "options": [{"name": "买入", "value": "buy"}, {"name": "卖出", "value": "sell"}],
            }
        }, {
            "type": "number",
            "name": "price",
            "label": "price",
            "description": "The price of the order",
            "group": "Trading Setup",
            "filter": "tradeType==1",
            "settings": {
                "required": True,
            }
        }, {
            "type": "number",
            "name": "amount",
            "label": "Order quantity",
            "description": "Order quantity",
            "group": "Trading Setup",
            "settings": {
                "required": True,
            }
        }],
    }

    while True:
        tbl = {"type": "table", "title": "dashboard", "cols": ["symbol", "actionOpen"], "rows": []}
        for m in arrManager:
            btnOpen = createBtn(tmpBtnOpen, [{"type": "string", "name": "symbol", "label": "交易品种", "default": m["symbol"], "settings": {"required": True}}])
            tbl["rows"].append([m["symbol"], btnOpen])

        cmd = GetCommand()

        if cmd != "" and cmd != None:
            Log("Receive interaction:", cmd) 

            # Parsing interaction messages: open:{"symbol":"LTC_USDT.swap","tradeType":0,"direction":"buy","amount":111}
            # According to the first colon: the previous instruction determines which button template triggers the message
            arrCmd = cmd.split(":")
            if arrCmd[0] == "open":
                msg = json.loads(cmd[5:])
                Log("Trading instruments:", msg["symbol"], ", Trading direction:", msg["direction"], ", Order type:", "Market order" if msg["tradeType"] == 0 else "Limit order", ", Order price: current market price" if msg["tradeType"] == 0 else ", Order price:" + str(msg["price"]), ", Order quantity:", msg["amount"])
        
        # Output status bar information
        LogStatus(_D(), "\n", "`" + json.dumps(tbl) + "`")
        Sleep(1000)
// Omit...

اسٹیٹس بار ٹیبل میں بٹن بنانے کے لئے تازہ ترین بٹن ڈھانچے کا استعمال کریں۔ جب تعامل شروع کرنے کے لئے بٹن پر کلک کریں تو ، ایک ملٹی کنٹرول پاپ اپ ونڈو پاپ اپ ہوگی۔ مزید تفصیلات کے لیے ملاحظہ کریں:صارف گائیڈ - حالت بار میں انٹرایکٹو کنٹرولز.

function main() {
    var table = { 
        type: 'table', 
        title: 'position operation', 
        cols: ['column1', 'column2', 'Action'], 
        rows: [ 
            ['abc', 'def', {'type':'button', 'cmd': 'coverAll', 'name': 'close positions'}]
        ]
    } 
    var ticker = exchange.GetTicker()
    // Add a row of data, merge the first and second cells, and output the ticker variable in the merged cell
    table.rows.push([{body : JSON.stringify(ticker), colspan : 2}, "abc"])    
    LogStatus('`' + JSON.stringify(table) + '`')
}
import json
def main():
    table = {
        "type" : "table",
        "title" : "position operation",
        "cols" : ["column1", "column2", "Action"],
        "rows" : [
            ["abc", "def", {"type": "button", "cmd": "coverAll", "name": "close positions"}]
        ]
    }
    ticker = exchange.GetTicker()
    table["rows"].append([{"body": json.dumps(ticker), "colspan": 2}, "abc"])
    LogStatus("`" + json.dumps(table) + "`")
void main() {
    json table = R"({
        "type" : "table",
        "title" : "position operation",
        "cols" : ["column1", "column2", "Action"],
        "rows" : [
            ["abc", "def", {"type": "button", "cmd": "coverAll", "name": "close positions"}]
        ]
    })"_json;            

    auto ticker = exchange.GetTicker();
    json jsonTicker = R"({"Buy": 0, "Sell": 0, "High": 0, "Low": 0, "Volume": 0, "Last": 0, "Time": 0})"_json;
    jsonTicker["Buy"] = ticker.Buy;
    jsonTicker["Sell"] = ticker.Sell;
    jsonTicker["Last"] = ticker.Last;
    jsonTicker["Volume"] = ticker.Volume;
    jsonTicker["Time"] = ticker.Time;
    jsonTicker["High"] = ticker.High;
    jsonTicker["Low"] = ticker.Low;            

    json arr = R"([{"body": {}, "colspan": 2}, "abc"])"_json;
    arr[0]["body"] = jsonTicker;
    table["rows"].push_back(arr);
    LogStatus("`" + table.dump() + "`");
}

کی طرف سے تیار ٹیبل کے اندر اندر خلیات کے افقی ضمLogStatus()فنکشن:

function main() {
    var table = { 
        type: 'table', 
        title: 'table demo', 
        cols: ['columnA', 'columnB', 'columnC'], 
        rows: [ 
            ['A1', 'B1', {'type':'button', 'cmd': 'coverAll', 'name': 'C1'}]
        ]
    }             

    var ticker = exchange.GetTicker()
    var name = exchange.GetName()            

    table.rows.push([{body : "A2 + B2:" + JSON.stringify(ticker), colspan : 2}, "C2"])
    table.rows.push([{body : "A3 + A4 + A5:" + name, rowspan : 3}, "B3", "C3"])
    // A3 is merged by the first cell in the previous row
    table.rows.push(["B4", "C4"])
    // A2 is merged by the first cell of the previous row
    table.rows.push(["B5", "C5"])                                            
    table.rows.push(["A6", "B6", "C6"])
    LogStatus('`' + JSON.stringify(table) + '`')
}
import json
def main():
    table = {
        "type" : "table", 
        "title" : "table demo", 
        "cols" : ["columnA", "columnB", "columnC"], 
        "rows" : [
            ["A1", "B1", {"type": "button", "cmd": "coverAll", "name": "C1"}]
        ]
    }
    
    ticker = exchange.GetTicker()
    name = exchange.GetName()
    
    table["rows"].append([{"body": "A2 + B2:" + json.dumps(ticker), "colspan": 2}, "C2"])
    table["rows"].append([{"body": "A3 + A4 + A5:" + name, "rowspan": 3}, "B3", "C3"])
    table["rows"].append(["B4", "C4"])
    table["rows"].append(["B5", "C5"])
    table["rows"].append(["A6", "B6", "C6"])
    LogStatus("`" + json.dumps(table) + "`")
void main() {
    json table = R"({
        "type" : "table", 
        "title" : "table demo", 
        "cols" : ["columnA", "columnB", "columnC"], 
        "rows" : [
            ["A1", "B1", {"type": "button", "cmd": "coverAll", "name": "C1"}]
        ]
    })"_json;
    // For testing purposes, the code is short and easy to read, and the constructed data is used here
    json jsonTicker = R"({"High": 0, "Low": 0, "Buy": 0, "Sell": 0, "Last": 0, "Time": 0, "Volume": 0})"_json;
    auto name = exchange.GetName();
    json arr1 = R"([{"body": "", "colspan": 2}, "C2"])"_json;
    arr1[0]["body"] = "A2 + B2:" + jsonTicker.dump();
    json arr2 = R"([{"body": "", "rowspan": 3}, "B3", "C3"])"_json;
    arr2[0]["body"] = "A3 + A4 + A5:" + name;
    table["rows"].push_back(arr1);
    table["rows"].push_back(arr2);
    table["rows"].push_back(R"(["B4", "C4"])"_json);
    table["rows"].push_back(R"(["B5", "C5"])"_json);
    table["rows"].push_back(R"(["A6", "B6", "C6"])"_json);
    LogStatus("`" + table.dump() + "`");
}

عمودی طور پر خلیات کی طرف سے تیار ٹیبل میں ضمLogStatus()فنکشن:

function main() {
    var table1 = {type: 'table', title: 'table1', cols: ['column1', 'column2'], rows: [ ['abc', 'def'], ['ABC', 'support color #ff0000']]}
    var table2 = {type: 'table', title: 'table2', cols: ['column1', 'column2'], rows: [ ['abc', 'def'], ['ABC', 'support color #ff0000']]}
    LogStatus('`' + JSON.stringify([table1, table2]) + '`')
}
import json
def main():
    table1 = {"type": "table", "title": "table1", "cols": ["column1", "column2"], "rows": [ ["abc", "def"], ["ABC", "support color #ff0000"]]}
    table2 = {"type": "table", "title": "table2", "cols": ["column1", "column2"], "rows": [ ["abc", "def"], ["ABC", "support color #ff0000"]]}
    LogStatus("`" + json.dumps([table1, table2]) + "`")
void main() {
    json table1 = R"({"type": "table", "title": "table1", "cols": ["column1", "column2"], "rows": [ ["abc", "def"], ["ABC", "support color #ff0000"]]})"_json;
    json table2 = R"({"type": "table", "title": "table2", "cols": ["column1", "column2"], "rows": [ ["abc", "def"], ["ABC", "support color #ff0000"]]})"_json;
    json arr = R"([])"_json;
    arr.push_back(table1);
    arr.push_back(table2);
    LogStatus("`" + arr.dump() + "`");
}

اسٹیٹس بار ٹیبل صفحہ بندی دکھائیں:

function main(){
    var tab1 = {
        type : "table",
        title : "table1",
        cols : ["1", "2"],
        rows : []
    }
    var tab2 = {
        type : "table",
        title : "table2",
        cols : ["1", "2", "3"],
        rows : []
    }
    var tab3 = {
        type : "table",
        title : "table3",
        cols : ["A", "B", "C"],
        rows : []
    }            

    tab1.rows.push(["jack", "lucy"])
    tab2.rows.push(["A", "B", "C"])
    tab3.rows.push(["A", "B", "C"])            

    LogStatus('`' + JSON.stringify(tab1) + '`\n' + 
        '`' + JSON.stringify(tab2) + '`\n' +
        '`' + JSON.stringify(tab3) + '`')
  
    Log("exit")
}
import json
def main():
    tab1 = {
        "type": "table", 
        "title": "table1", 
        "cols": ["1", "2"], 
        "rows": []
    }
    tab2 = {
        "type": "table", 
        "title": "table2", 
        "cols": ["1", "2", "3"], 
        "rows": []
    }
    tab3 = {
        "type": "table", 
        "title": "table3", 
        "cols": ["A", "B", "C"], 
        "rows": []
    }            

    tab1["rows"].append(["jack", "lucy"])
    tab2["rows"].append(["A", "B", "C"])
    tab3["rows"].append(["A", "B", "C"])
    LogStatus("`" + json.dumps(tab1) + "`\n" + 
        "`" + json.dumps(tab2) + "`\n" + 
        "`" + json.dumps(tab3) + "`")
void main() {
    json tab1 = R"({
        "type": "table", 
        "title": "table1", 
        "cols": ["1", "2"], 
        "rows": []
    })"_json;
    json tab2 = R"({
        "type": "table", 
        "title": "table2", 
        "cols": ["1", "2", "3"], 
        "rows": []
    })"_json;
    json tab3 = R"({
        "type": "table", 
        "title": "table3", 
        "cols": ["A", "B", "C"], 
        "rows": []
    })"_json;
    tab1["rows"].push_back(R"(["jack", "lucy"])"_json);
    tab2["rows"].push_back(R"(["A", "B", "C"])"_json);
    tab3["rows"].push_back(R"(["A", "B", "C"])"_json);
    LogStatus("`" + tab1.dump() + "`\n" + 
        "`" + tab2.dump() + "`\n" +
        "`" + tab3.dump() + "`");
}

صفحات میں ٹیبلز کی نمائش کے علاوہ، متعدد ٹیبلز کو اوپر سے نیچے کے حکم میں بھی دکھایا جا سکتا ہے:

function main() {
    var tbl = {
        type : "table",
        title : "test scroll",
        scroll : "auto",
        cols : ["col 0", "col 1", "col 2", "col 3", "col 4", "col 5", "col 6", "col 7", "col 8", "col 9", "col 10", 
            "col 11", "col 12", "col 13", "col 14", "col 15", "col 16", "col 17", "col 18", "col 19", "col 20"],
        rows : []
    }

    for (var i = 1 ; i < 100 ; i++) {
        tbl.rows.push([i, "1," + i, "2," + i, "3," + i, "4," + i, "5," + i, "6," + i, "7," + i, "8," + i, "9," + i, "10," + i, 
            "11," + i, "12," + i, "13," + i, "14," + i, "15," + i, "16," + i, "17," + i, "18," + i, "19," + i, "20," + i])
    }
    
    LogStatus("`" + JSON.stringify(tbl) + "`")
}
import json

def main():
    tbl = {
        "type" : "table",
        "title" : "test scroll",
        "scroll" : "auto",
        "cols" : ["col 0", "col 1", "col 2", "col 3", "col 4", "col 5", "col 6", "col 7", "col 8", "col 9", "col 10", 
            "col 11", "col 12", "col 13", "col 14", "col 15", "col 16", "col 17", "col 18", "col 19", "col 20"],
        "rows" : []
    }

    for index in range(1, 100):
        i = str(index)
        tbl["rows"].append([i, "1," + i, "2," + i, "3," + i, "4," + i, "5," + i, "6," + i, "7," + i, "8," + i, "9," + i, "10," + i, 
            "11," + i, "12," + i, "13," + i, "14," + i, "15," + i, "16," + i, "17," + i, "18," + i, "19," + i, "20," + i])
    
    LogStatus("`" + json.dumps(tbl) + "`")
void main() {
    json table = R"({
        "type" : "table",
        "title" : "test scroll",
        "scroll" : "auto",
        "cols" : ["col 0", "col 1", "col 2", "col 3", "col 4", "col 5", "col 6", "col 7", "col 8", "col 9", "col 10", 
            "col 11", "col 12", "col 13", "col 14", "col 15", "col 16", "col 17", "col 18", "col 19", "col 20"],
        "rows" : []
    })"_json;

    for (int index = 1; index < 100; ++index) {
        std::string i = std::to_string(index);
        table["rows"].push_back({i, "1," + i, "2," + i, "3," + i, "4," + i, "5," + i, "6," + i, "7," + i, "8," + i, "9," + i, "10," + i,
            "11," + i, "12," + i, "13," + i, "14," + i, "15," + i, "16," + i, "17," + i, "18," + i, "19," + i, "20," + i});
    }

    LogStatus("`" + table.dump() + "`");
}

اسٹیٹس بار ٹیبل کے افقی اور عمودی سکرول موڈ کو سیٹ کرنے کے لئے سپورٹ.scrollکے لئے وصف"auto"، جب اسٹیٹس بار ٹیبل کی عمودی صفوں کی تعداد 20 صفوں سے زیادہ ہو تو مواد سکرول کیا جائے گا۔ جب افقی کالموں کی تعداد صفحے کی نمائش کے دائرے سے زیادہ ہو تو ،scrollاس خصوصیت کا استعمال براہ راست تجارت کے دوران بڑی مقدار میں اعداد و شمار کو اسٹیٹس بار میں لکھنے کے تاخیر کے مسئلے کو کم کرنے کے لئے کیا جاسکتا ہے۔ مندرجہ ذیل ٹیسٹ کی مثال دیکھیں:

معلومات کی پیداوارLogStatus()جب لائیو ٹریڈنگ چل رہی ہے تو اس فنکشن کو لائیو ٹریڈنگ ڈیٹا بیس میں محفوظ نہیں کیا جاتا ہے، لیکن یہ صرف موجودہ لائیو ٹریڈنگ کی حیثیت بار کے مواد کو اپ ڈیٹ کرتا ہے۔ کےLogStatus()تقریب پرنٹنگ کی حمایت کرتا ہےbase64کوڈ شدہ تصاویر، کے ساتھ شروع`اور اس کے ساتھ ختم`مثلاً:LogStatus("`data:image/png;base64,AAAA`"). کےLogStatus()فنکشن گزرنے کی حمایت کرتا ہےmatplotlib.pyplotاشیاء براہ راست میںPython، جب تک کہ اعتراض میں شامل ہےsavefigطریقہ کار، یہ ایک پیرامیٹر کے طور پر منتقل کیا جا سکتا ہےLogStatus()فنکشن، مثال کے طور پر:

import matplotlib.pyplot as plt 
def main():
    plt.plot([3,6,2,4,7,1])
    LogStatus(plt) 

جب حکمت عملی رواں تجارت چل رہی ہے ، اگر آپ رواں تجارت کے صفحے پر تاریخ کے ذریعے جاتے ہیں تو ، اسٹیٹس بار سوتے ہیں اور اپ ڈیٹ کرنا بند کردیتے ہیں۔ جب لاگ پہلے صفحے پر ہوتا ہے تو صرف اسٹیٹس بار کے ڈیٹا کو تازہ دم کیا جاتا ہے۔ یہ آؤٹ پٹ کی حمایت کرتا ہےbase64حالت بار میں انکوڈ تصاویر، اور یہ بھی پیداوار کی حمایت کرتا ہےbase64اسٹیٹس بار میں دکھائے جانے والے ٹیبل میں کوڈت تصاویر۔ چونکہ کوڈت تصویر کا سٹرنگ ڈیٹا عام طور پر بہت لمبا ہوتا ہے ، لہذا نمونہ کوڈ نہیں دکھایا جاتا ہے۔

{@fun/Global/GetCommand GetCommand} {@fun/Global/GetCommand GetCommand} {@fun/Global/GetCommand GetCommand} {@گلوبل/GetCommand GetCommand} {@گلوبل/GetCommand GetCommand} {@گلوبل/GetCommand GetCommand}

لاگپروفٹ ری سیٹ کریں EnableLog کو فعال کریں