Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting strategy on futures

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Backtesting strategy on futures

    Hello,
    I made a strategy myself that includes some sort of position sizing algorithm. When running the strategy on stocks everything works perfect using Close[0] as current price, but when I run it on futures, I woud have to know the margin and not the real value of the contract.
    Is there any way to check if the traded contract is a future and if it is, to access its margin?

    #2
    xToast,

    You can use : Instrument.MasterInstrument.InstrumentType



    MasterInstrument.Margin and MasterInstrument.Margin2 are unsupported, but you are free to try them out.
    Adam P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by strategist007, Today, 07:51 PM
    0 responses
    2 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,968 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    4 views
    0 likes
    Last Post rbeckmann05  
    Started by rhyminkevin, Today, 04:58 PM
    4 responses
    58 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Started by iceman2018, Today, 05:07 PM
    0 responses
    6 views
    0 likes
    Last Post iceman2018  
    Working...
    X