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 Max238, Today, 01:28 AM
    5 responses
    42 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by giulyko00, Yesterday, 12:03 PM
    3 responses
    12 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by habeebft, Today, 07:27 AM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_ChristopherS  
    Started by AveryFlynn, Today, 04:57 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Erick  
    Started by r68cervera, Today, 05:29 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X