Set Option Futures Mode vs Settings Question

Hi, I am trying to overrride PointValue using AFL in futures mode.

But I can't figure out why I get different results using SetOption("FuturesMode", True) vs selecting the Futures Mode option in the backtest settings. Here is what is happening:

This code (full code posted):

PointValue = 10;
//SetOption("FuturesMode", True );
Filter=1;
AddColumn(PointValue, "PointValue", 1.0);

Gives me this Exploration output:

image1

However the same code, but setting futures mode in AFL:

PointValue = 10;
SetOption("FuturesMode", True );
Filter=1;
AddColumn(PointValue, "PointValue", 1.0);

Gives me this Exploration output:

image2

The settings window in both cases is the same:

My question is: why can't I overrride pointvalue when using SetOption("FuturesMode", True) but I can when setting futures mode in settings? What else do I need to do in AFL?

Futures mode via SetOption must be set BEFORE assigning PointValue.

// this has to be called FIRST! as it will set PointValue according to Symbol Information!
SetOption("FuturesMode", True );

PointValue = 10;

Filter=1;
AddColumn(PointValue, "PointValue", 1.0);

It is also important to understand that Exploration is NOT backtesting and Exploration does NOT have "futures mode".

2 Likes

Thank you Tomasz, I wasn't aware of this.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.