Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Strategies Initial Position

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

    Strategies Initial Position

    I intended to write a few simple trading assistants in NT script but I just came accross the "virtual position" problem.

    Suppose you have a long position and a trader helper implemented as an NT strategy which will trail rising bars lows with a stop 1 tick under the most recent low. The idea is that one starts the strategy and when done the assistant will switch off.

    When a strategy is started, NT wants to "discover" what the current strategy position should be by replaying the available bars and it will of course never be what your actual position is!.
    This just destroys the idea of trading assistants since it will result in
    a complete mess.

    Would it be possible to have extra parameters to start with strategy position = account position and block bars replay since it may not be needed.

    Is there a simple way to set strategy position = actual position
    in NT Script ? same thing for blocking bar replay in Initialize().

    A few other points about strategies :
    - Suppose you have 10+ strategies, this is going to cost you
    at least 100 mouse cliks on each NT startup.
    Would be nice is the current strat list was part of workspace saving.
    A separate window grouping start/stop buttons for strategies would be helpful.

    - In the strategies pane, the START/STOP button should be in the first
    column, before strat name, a misclick is very easy if the list is long.

    - ATM strategies are selectable from chart trader. Would be nice if NT Script strategies would be selectable, run and stopped on charts.

    Runing beta 6.5.0.4
    Best regards
    Alain.

    #2
    Virtual position is a feature in that it allows many strategies to run on the same market at the same time. It also allows a srtrategy to to run independant of any discretionary trades providing the optimimum in flexibility.

    That being said, there is no supported way to get the actual account based position through a strategy.

    Loading multiple strategies is on our list for future possible enhancements, this does come up quite often. Thanks for raising this as a feature request.
    RayNinjaTrader Customer Service

    Comment


      #3
      I have tacked on the following to my signals. it looks for an instrument.flat file and if exists triggers the flat routine within the strategy. if someone sees a problem with this please let me know. Thanks, Howie

      ...// Flat signal
      || System.IO.File.Exists(Temp)

      initialization (userdata is NT 6.5 in mydocs directory)
      Temp = Cbi.Core.UserDataDir.ToString() + "Lucy\\" + Instrument.MasterInstrument.Name + ".Flat";


      This flatens the strategy and with the "go live after flat" selected it gives my strategy a chance to enter later if it still wants to.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by mmckinnm, Today, 01:34 PM
      0 responses
      1 view
      0 likes
      Last Post mmckinnm  
      Started by f.saeidi, Today, 01:32 PM
      0 responses
      1 view
      0 likes
      Last Post f.saeidi  
      Started by traderqz, Today, 12:06 AM
      9 responses
      16 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by kevinenergy, 02-17-2023, 12:42 PM
      117 responses
      2,766 views
      1 like
      Last Post jculp
      by jculp
       
      Started by Mongo, Today, 11:05 AM
      5 responses
      15 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X