Available since version 2.05
Esta função retorna a direção média ponderada das posições abertas, considerando o tipo de operação e os filtros fornecidos.
Function
Section titled “Function” Name: AvgDir Copied!
Aliases: PAvgDir Copied!
Parameters
Section titled “Parameters”| ENUM_POSITION_TYPE | type | = TYPE_ALL; | // Tipo de posição (COMPRA/VENDA/TODAS). |
Representa uma sequência de caracteres Unicode. | symbol | = REAL; | // Símbolo do ativo. |
Representa um inteiro sem sinal de 64 bits (0 até 18446744073709551615). | magic | = MAGIC; | // Número mágico para filtrar as operações. |
Examples
Section titled “Examples”//Default example:
AvgDir[type = TYPE_ALL, symbol = REAL, magic = MAGIC]
//Using aliases:
PAvgDir[type = TYPE_ALL, symbol = REAL, magic = MAGIC]
//Other examples:
AvgDir(POSITION_TYPE_SELL, "ITUB4", 123456)