• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot Executions on ES Chart while Trading MES

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

    Plot Executions on ES Chart while Trading MES

    I am trying to create something to Plot MES Trades on an ES Chart. Basically duplicating the DataSeries | Trades | Text and marker setting. Since these are different Instruments the ES Chart will not recognize the MES trades.

    Looking for a pointer on which direction I should take: Indicator Script, Addon, or wait for NT to make that feature available (Hint)? Obviously I will have to create my on position update tracking which I think I can do. I am looking for direction on what will work on a chart. I don't need an Addon Window as I want the markers in the ES Chart.

    Any help, code snippets or suggestion would be greatly appreciated.




    PS: the Account Link in Ninjascript | Language Reference | Addon may have an issue. Does not work on my computer.


    #2
    Hi TAJTrades,

    Thanks for your post.

    An indicator will suffice for this. See this help guide example on adding an account object to your script https://ninjatrader.com/support/help...ount_class.htm

    You can follow that example and set up an account object in your indicator. You can then use the Executions collection within the Account class to loop through and draw the executions of MES on your ES chart.

    All the best regards!
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      I am using an ATM with just a Target and a Stop for trade management.

      Using OnExecutionUpdate from the Account Class as suggested and also Using OnOrderUpdate I can get all current trades to print correctly to the OutputWindow.
      I can also Draw.Ray for the Open Position Entry, Target and Stop.

      However when the Stop or Target is hit I am trying to Draw.Line from the Trade Open to the Trade Close and everything craps out. No post in the Control Center | Log or anything to the OutputWindow. Why would Draw.Ray work but not Draw.Line not? I have printed all the Line values (prices, start bars ago.....) and they are correct.

      Any suggestion. I can post code here or email it that would help.

      Comment


        #4
        Hi TAJTrades, thanks for your patience.

        I would recommend using Draw.Line rather than a Ray. With a Line, you can define both start and end points.

        See here for the documentation on Draw.Line:
        https://ninjatrader.com/support/help...?draw_line.htm

        Please let me know if you have any questions on that.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by chazyang, Today, 02:01 AM
        1 response
        4 views
        0 likes
        Last Post chazyang  
        Started by tonynt, Today, 01:20 AM
        0 responses
        13 views
        0 likes
        Last Post tonynt
        by tonynt
         
        Started by sdauteuil, Yesterday, 11:02 PM
        1 response
        3 views
        0 likes
        Last Post sdauteuil  
        Started by Jschmelz, Yesterday, 04:45 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Marco  
        Started by sisenberg, Yesterday, 08:06 PM
        1 response
        11 views
        0 likes
        Last Post sisenberg  
        Working...
        X