PMM Keywords: Difference between revisions
From MultiCharts
no edit summary
No edit summary |
No edit summary |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 23: | Line 23: | ||
'''[[pmms_strategy_close_position]](idx)''' – close a strategy position with an idx number with market order (orders generated by the strategy will be deleted from Raw Orders collection). <br> | '''[[pmms_strategy_close_position]](idx)''' – close a strategy position with an idx number with market order (orders generated by the strategy will be deleted from Raw Orders collection). <br> | ||
'''[[pmms_strategy_set_entry_contracts]](idx, contracts)''' – set the number of contracts for the strategy’s entry with an idx number (size calculated by the strategy itself will be ignored). To use the order size calculated by the strategy itself set “contracts” parameter to | '''[[pmms_strategy_close_position_partial]](idx, isNextBar, contracts)''' – partially close position of the specified strategy for the set number of contracts.<br> | ||
'''[[pmms_strategy_set_entry_contracts]](idx, contracts)''' – set the number of contracts for the strategy’s entry with an idx number (size calculated by the strategy itself will be ignored). To use the order size calculated by the strategy itself set “contracts” parameter to -1. <br> | |||
'''[[pmms_strategy_get_entry_contracts]](idx)''' – get the number of contracts of the entry order of the strategy with an idx number. <br> | '''[[pmms_strategy_get_entry_contracts]](idx)''' – get the number of contracts of the entry order of the strategy with an idx number. <br> | ||
'''[[pmms_strategy_allow_entries]](idx)''' – allow entry orders for a strategy with an idx number. <br> | '''[[pmms_strategy_allow_entries]](idx)''' – allow entry orders for a strategy with an idx number. <br> | ||
'''[[pmms_strategy_allow_long_entries]](idx)''' – the same as pmms_strategy_allow_entries, but applied for long entries only. <br> | |||
'''[[pmms_strategy_allow_short_entries]](idx)''' – the same as pmms_strategy_allow_entries, but applied for short entries only. <br> | |||
'''[[pmms_strategy_deny_entries]](idx)''' – deny entry orders for a strategy with an idx number (entry orders will be deleted from Raw Orders collection). <br> | '''[[pmms_strategy_deny_entries]](idx)''' – deny entry orders for a strategy with an idx number (entry orders will be deleted from Raw Orders collection). <br> | ||
Line 47: | Line 53: | ||
'''[[pmms_strategy_currentcontracts]](idx)''' – returns a value representing a positions’ number of contracts which was opened by the strategy with an idx number. <br> | '''[[pmms_strategy_currentcontracts]](idx)''' – returns a value representing a positions’ number of contracts which was opened by the strategy with an idx number. <br> | ||
'''[[pmms_strategy_entryprice]](idx)''' – returns a numerical value | '''[[pmms_strategy_entryprice]](idx)''' – returns a numerical value, indicating the price at the initial entry into the specified position opened by the strategy with StrategyIndex number.<br> | ||
'''[[pmms_Strategy_RiskCapital]](idx)''' – returns a numerical value representing the amount of money withheld as a risk capital for the open position of the strategy with an idx number. <br> | '''[[pmms_Strategy_RiskCapital]](idx)''' – returns a numerical value representing the amount of money withheld as a risk capital for the open position of the strategy with an idx number. <br> | ||
Line 72: | Line 78: | ||
'''[[pmm_set_global_named_str]](var_name, val)''' – set the value of global string var_name variable. <br> | '''[[pmm_set_global_named_str]](var_name, val)''' – set the value of global string var_name variable. <br> | ||
'''[[pmm_get_my_index]]''' - returns a numerical value, indicating zero-based index of the current trading strategy. <br> | |||
'''[[convert_currency]](datetime, currencyCode1, currencyCode2, moneyValue)''' – moneyValue is a value conversion from the currency designated currencycode1, into the currency with currencycode2, using the rate at the datetime moment. For example, convert_currency(datetime, codeEUR, codeJPY, 500) will convert 500 EUR value to Japanese Yens using the rate at the moment of calculation at the current bar. <br> | '''[[convert_currency]](datetime, currencyCode1, currencyCode2, moneyValue)''' – moneyValue is a value conversion from the currency designated currencycode1, into the currency with currencycode2, using the rate at the datetime moment. For example, convert_currency(datetime, codeEUR, codeJPY, 500) will convert 500 EUR value to Japanese Yens using the rate at the moment of calculation at the current bar. <br> | ||
'''currencyCodeToStr(currencyCode)''' – string value for the currency with currencyCode code. For example, currencycodetostr(symbolcurrencycode) will return “EUR” value, if the strategy is calculated using the symbol with EUR as a basic currency. <br> | '''[[currencyCodeToStr]](currencyCode)''' – string value for the currency with currencyCode code. For example, currencycodetostr(symbolcurrencycode) will return “EUR” value, if the strategy is calculated using the symbol with EUR as a basic currency. <br> | ||
'''[[symbolCurrencyCode]] '''– returns currency code of the current symbol. <br> | '''[[symbolCurrencyCode]] '''– returns currency code of the current symbol. <br> |