Second question, assuming the above works and it is does test all contracts in the test period, if I have code in my script that tests for which contract expiry it is trading on, will the script see FESX 03-14 (as that is the contract selected in the strategy analyzer) OR the actual contract expiry it is testing?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Merge Non Back adjusted
Collapse
X
-
Merge Non Back adjusted
If I am using the Strategy analyzer for WFA on say FESX (set to Merge Non Back Adjusted) from March 2010 to March 2012, and I select FESX 03-14 from the contract list on the left of the strategy analyzer. Will the analyzer then test all the FESX contract that fall within the test period or will it not test at all as FESX 03-14 has no data for that period?
Second question, assuming the above works and it is does test all contracts in the test period, if I have code in my script that tests for which contract expiry it is trading on, will the script see FESX 03-14 (as that is the contract selected in the strategy analyzer) OR the actual contract expiry it is testing?Tags: None
-
Thanks, bur how about the logic test in the strategy,
// Prevent System from trading before coontract is front month.
if(
((Instrument.Expiry.Month == 3) && (Time[0].Date.Month == 12) && (Time[0].Date.Day < iStartTradeDate))
|| ((Instrument.Expiry.Month == 3) && ((Time[0].Date.Month >3) || (Time[0].Date.Month <12)))
|| ((Instrument.Expiry.Month == 6) && (Time[0].Date.Month == 3) && (Time[0].Date.Day < iStartTradeDate))
|| ((Instrument.Expiry.Month == 6) && ((Time[0].Date.Month >6) || (Time[0].Date.Month <3)))
|| ((Instrument.Expiry.Month == 9) && (Time[0].Date.Month == 6) && (Time[0].Date.Day < iStartTradeDate))
|| ((Instrument.Expiry.Month == 9) && ((Time[0].Date.Month >9) || (Time[0].Date.Month <6)))
|| ((Instrument.Expiry.Month == 12) && (Time[0].Date.Month == 9) && (Time[0].Date.Day < iStartTradeDate))
|| ((Instrument.Expiry.Month == 12) && ((Time[0].Date.Month >12) || (Time[0].Date.Month <9)))
)
{
return;
}
Will the strategy see the actual contract it is testing on or FESX 03-14?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
68 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
38 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
62 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
62 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment