Hi,
I use pmms_strategy_get_entry_contracts(idx) in MultiCharts9.1, no matter what the contract is, it always return -1.
Please have a check on this keyword.
Thank you~
pmms_strategy_get_entry_contracts(idx) always return -1 [SOLVED]
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: pmms_strategy_get_entry_contracts(idx) always return -1
Hello winnie,
pmms_strategy_get_entry_contracts returns the number of contracts only if the value was overridden by pmms_strategy_set_entry_contracts on the current calculation. So the value is Set first, then it can be Get.
You can use pmms_strategy_set_entry_contracts(pmm_get_my_index, Contracts) in the trading signal to define the number of contracts for this strategy to buy.
Then you can use pmms_strategy_get_entry_contracts in PMMS to get the value, and you can also override it with pmms_strategy_set_entry_contracts from PMMS.
pmms_strategy_get_entry_contracts returns the number of contracts only if the value was overridden by pmms_strategy_set_entry_contracts on the current calculation. So the value is Set first, then it can be Get.
You can use pmms_strategy_set_entry_contracts(pmm_get_my_index, Contracts) in the trading signal to define the number of contracts for this strategy to buy.
Then you can use pmms_strategy_get_entry_contracts in PMMS to get the value, and you can also override it with pmms_strategy_set_entry_contracts from PMMS.