Is it possible to script the strategy instrument and data range?
31.07.2020 13.59

Not Course Related

Frank

Have tried a while to figure out, but didn't find where to actually look up for it.

Any hint available ?

  • Yuri Zolotarev
    01.08.2020 09:27

    Its not clear what you want to do.

  • Frank
    01.08.2020 12:38

    Hey Yuri, thx for reply. 

    The problem is, I can't yet define the exact instrument and data range for the strategy performance. Kinda does a bit what it wants. Data-range settingsin Data-Series (right click chart) are not catching the targeted date range as it seems. (PIC)


    Also the instrument FDAX 09-20 (Future) is taking also the adjacent instruments FDAX 06-20, which is good on the one side that all FDAX series are seen as one, but for analysis focus it'd be good to have an option to limit the strategy performance to certain Futures.


    The historical strategy performance seems not to be catching reliably, sometimes the strategy performanc shown none or way less trades than obviously occuring on the chart.

    I'm taking into account here, that the strategy performance is called from the same chart window the strategy was added to. So the strategy was not added in the strategy tab of the control panel.


    Wanted to figure if NT offers a way to accurately define the instrument and data range for the backtest from within the script. Do you know if it is possible to script it ?, didn't find info about this specific point yet.


    From side of N8 support its said that its good to filter the trades by a DayTime filter, which is good for me, but was wondering if there is also other approaches for the script or within the N8 app to limit the strategy performance successfully.


    " Quote N8 support answer:

    Hello Frank, Thanks for your reply.

    This can be a confusing subject because of the confusion regarding calendar days versus trading sessions which can occur over a two day period.  For example, ES ETH goes from late afternoon from 1 day to late afternoon the next day, so 1 day of ES actually would look like 2 days.

    What I would suggest is that you simply ignore the start and end dates of the report and run replay as I advised when you set a specific start date/time and run it to your preferred end date/time and only look at the real-time report.  You can always review the "trades" display to see when the first and last trades occurred.

    In a script, you can specify a time filter.  This can be used to check to see if the bar time is withing the filter and this execute (or not) trades.

    Here is a link to an example:  https://ninjatrader.com/support/helpGuides/nt8/?using_a_time_filter_to_limit_t.htm

    End Quote "




  • Yuri Zolotarev
    01.08.2020 13:37

    I think start and end dates in your pic might refer to the first and last trade dates.

  • Frank
    01.08.2020 13:44

    ya also was thinking, but then when i deleted some of the temporarily unwanted data the strategy performance result changed.

    Curios what difference N8 brings when i put up the date time filter in the strategy and switch it on and off. Then i know better if N8 data-range is working as expected + i can set dayTime limits.

  • Frank
    01.08.2020 14:49

    ... here is such an example, where it seems that data isn't even loaded in the chart as expected. I tried to restart, N8, re-load the data etc. but still, the downloaded 29th July data is not present in the chart and thus not in the strategy.