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

Strategy does not plot trades on chart

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

    Strategy does not plot trades on chart

    Hello,
    I started experimenting with the strategy builder. I started with something very simple, if the candle closes above the 20 EMA go long. However, although I appear to have an open order, the chart, positions, and account information seem to be wrong (reference: StrategyShot02.png).

    All I really want is to be able to plot the strategy orders in the same way my ATM orders are plotted when I use the chart trader (reference: ChartTraderExample.png)

    The code from the strategy builder doesn't seem very complicated (reference: strategyCode.zip) so I'm a bit confused about what's going wrong and would appreciate any assistance.

    Thanks
    Attached Files

    #2
    Hello IndyScalper,

    Thanks for your post.

    When the strategy is enabled, it processes historical data to determine trades that the strategy would have made on the data that is already on the PC/chart and to determine what position the strategy is in. (Strategy positions are separate from actual Account positions.)

    The initial order you see when enabling the strategy atre historical (virtual) positions which is why they don't appear on the Positions tab of the Control Center. Once the Stop or Target order of the historically calculated strategy position is filled and we see a another entry order placed realtime, we see the order on the Positions tab of the Control Center, the Orders tab of the Control Center, and the Strategies tab of the Control Center.

    Instead of using the Start Behavior 'Immediately Submit', you could use 'Immediately Submit, Synchronize Account' so you could begin trading with your strategy immediately while not worrying about your Account Position prior to start. This option will have NinjaTrader submit an order to sync the account position to the position calculated by the strategy. This means the Strategy Position and Account position will be in sync.

    See the help guide documentation below for more information.

    Strategy Position vs Account Position: https://ninjatrader.com/support/help..._account_p.htm
    Synchronize Account Positions (Start Behavior): https://ninjatrader.com/support/help..._positions.htm

    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by ETFVoyageur, Today, 07:55 PM
    0 responses
    6 views
    0 likes
    Last Post ETFVoyageur  
    Started by janio973, Today, 07:24 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by aligator, 01-06-2022, 12:14 PM
    4 responses
    242 views
    0 likes
    Last Post john_44573  
    Started by reynoldsn, Today, 05:56 PM
    0 responses
    13 views
    0 likes
    Last Post reynoldsn  
    Started by bortz, 11-06-2023, 08:04 AM
    51 responses
    1,996 views
    0 likes
    Last Post aligator  
    Working...
    X