- ago
2. i want to use pointvalue, it seem like only can be refed in future mode, how should i coding this? i tried :

CODE:
public override void Execute(BarHistory bars, int idx) { bars.FuturesModeEnabled = true; BacktestSettings.FuturesMode = true;

but still can not give the PointValue.

hope to get some help.
0
191
2 Replies

Reply

Bookmark

Sort
- ago
#1
Quoting the API manual, see the text in bold:

QUOTE:
FuturesMode
public bool FuturesMode

Set by the backtester, returns true if Futures Mode was enabled for this backtest.


Wealth-Lab sets it, you can neither do it nor have the need in it. What you can do in order to get it working is simply configure your symbol or market in Tools > Markets & Symbols.
0
Cone8
 ( 5.94% )
- ago
#2
If it's not clear, you need to enable Futures Mode in Preferences > Backtest > Other Settings.
If your data provider doesn't automatically assign the contract specs, you need to do that in Tools > Markets & Symbols.

Also, when doing 1-time initializations for a strategy, do it in Initialize() or BacktestBegin() - not in Execute(), which is hit for every bar for every symbol in the backtest.
0

Reply

Bookmark

Sort