getOpenLots (SDK Trading)

getOpenLots is a Fintechee API to get the open lots of the specific open trade.

getOpenLots(openTrade) ⇒ number

EA SDK This function gets the volume lots(100000 units per lot) of the specific open trade. Phase (this API's scope): onTick | deinit

Kind: global function
Returns: number - volume lots(100000 units per lot).

Param Type Description
openTrade object specific open trade

getOpenLots (SDK Trading)

registerEA(
"test_api",
"An EA to test APIs",
[],
function (context) { // Init()
},
function (context) { // Deinit()
},
function (context) { // OnTick()
    var length = getOpenTradesListLength(context)
    for (var i = 0; i < length; i++) {
        var openTrade = getOpenTrade(context, i)
        if (openTrade != null) {
            var lots = getOpenLots(openTrade)
        }
    }
})