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
-
GKonheiser, with the merge selected and analysis run on 03-14 - that's contract you would be using consistently. NinjaTrader would simply merge in past data from expired contracts into this frontmonth so you have an extended history contract that could also be executed on realtime.BertrandNinjaTrader Customer Service
-
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 samish18, 04-17-2024, 08:57 AM
|
27 responses
116 views
0 likes
|
Last Post Today, 11:49 AM | ||
Started by ETFVoyageur, 04-30-2024, 02:04 PM
|
7 responses
43 views
0 likes
|
Last Post
by eDanny
Today, 11:45 AM
|
||
Started by f.saeidi, Today, 07:07 AM
|
5 responses
15 views
0 likes
|
Last Post Today, 11:40 AM | ||
Started by Creamers, 04-27-2024, 05:32 AM
|
9 responses
60 views
0 likes
|
Last Post
by Creamers
Today, 11:33 AM
|
||
Decrease the size of the RegionHIghLightY on each tick when the price touches it
by cmtjoancolmenero
Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
|
19 responses
59 views
0 likes
|
Last Post Today, 11:31 AM |
Comment