• 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

Change Text on Chart after Stop Loss executes

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

    Change Text on Chart after Stop Loss executes

    I would appreciate some guidance...

    I am using
    Code:
    ExitLong ("Condition 4");
    trying to replace "Stop loss" or add to "Stop loss" the text "Condition 4" on my chart.

    The stop loss is firing perfectly, and I can compile without error, but the "Condition 4" is not appearing on the chart.

    I also tried
    Code:
    ExitLong(string1)
    wherein string1 was "Condition 4" but like above, no compiling error but no printing on the chart either.

    As I have several conditions that close a trade, I'd like to be able to READ some text on the chart instead of figuring it out every time.

    Thanks in advance...The ExitLong help section wasn't much help to me.

    #2
    Hello sarasotavince,

    Thank you for your post.

    You will want to add TraceOrders = true; to the Initialize() method.

    This will print out the orders to the Output window (Tools -> Output Window) and what is occuring with them.

    If you do not see any outputs for the Exit() order then it is highly likely that the condition for the Exit() is not being met.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      The Exit Order is firing (and completing without issue).

      All I need to do is add TEXT to the chart to tell me which Exit Condition was triggered. The default "Stop Loss" does tell me which condition was utilized.

      So, any way to add some text to the chart besides STOP LOSS? Maybe my question wasn't so clear earlier.

      Comment


        #4
        sarasotavince,

        I see what you mean now.

        You need to set the Plot Executions from the Data Series window to Text and Marker

        Right click on the Chart and select Data Series...

        Find the property PlotExecutions on the far bottom right list.
        Cal H.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by sarasotavince View Post
          The Exit Order is firing (and completing without issue).

          All I need to do is add TEXT to the chart to tell me which Exit Condition was triggered. The default "Stop Loss" does tell me which condition was utilized.

          So, any way to add some text to the chart besides STOP LOSS? Maybe my question wasn't so clear earlier.
          You need to use the correct syntax.
          Code:
          ExitLong ("Condition 4","");
          if you want to show the same text for all orders. Otherwise use the orderName where the empty sting is located.

          Comment


            #6
            Yes, that did it.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Dr3am, Today, 05:10 PM
            0 responses
            1 view
            0 likes
            Last Post Dr3am
            by Dr3am
             
            Started by imalil, Today, 04:28 PM
            0 responses
            3 views
            0 likes
            Last Post imalil
            by imalil
             
            Started by bboyle1234, Today, 03:47 PM
            0 responses
            1 view
            0 likes
            Last Post bboyle1234  
            Started by caveat_lector, Today, 03:46 PM
            0 responses
            6 views
            0 likes
            Last Post caveat_lector  
            Started by fx.practic, Today, 03:29 PM
            0 responses
            3 views
            0 likes
            Last Post fx.practic  
            Working...
            X