Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

draw-remove

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

  • tonynt
    replied
    Adam,

    thank you for your reply.

    so, please answer me only the first question:

    how can I do "drawhorizontalline" exactly at the current price and not as shown in all the samples on the website with Low[0] or High[0].

    Only to draw at the current price (Ask, Bid, no matter) but not at the close, high or low of bar.

    Thanks
    Tony

    Originally posted by NinjaTrader_AdamP View Post
    TonyNT,

    Unfortunately what you are asking is a bit more complicated than a one-liner here. Likely you will want to keep track of your Order object using IOrder.



    Then monitor when the order executes its entry and exit, as well as keeping tracking of what price the execution occurred at using OnExecution :



    You can then use the prices you stored to draw your lines.

    Leave a comment:


  • NinjaTrader_AdamP
    replied
    TonyNT,

    Unfortunately what you are asking is a bit more complicated than a one-liner here. Likely you will want to keep track of your Order object using IOrder.



    Then monitor when the order executes its entry and exit, as well as keeping tracking of what price the execution occurred at using OnExecution :



    You can then use the prices you stored to draw your lines.

    Leave a comment:


  • tonynt
    replied
    Adam,

    yes I confirm

    YES I WANT also to draw a horizontal line below or above the current price, from where an order entered and exited.

    BUT not below Low[0] or above High[0] of the bar - I want to draw at the current price where an order is entered and exited.

    Thanks
    Tony


    Originally posted by NinjaTrader_AdamP View Post
    tonynt,



    From this I am interpreting your meaning as you want to orders to be drawn on your chart as if they were drawn like in ChartTrader. This can already be done with the steps I showed you.

    Do you also want to draw a horizontal line below or above the current price, from where an order entered and exited?

    Leave a comment:


  • NinjaTrader_AdamP
    replied
    tonynt,

    I would like to have the same informations as one would have with chart-trader. As one can not acitvate chart trader when strategies are running I want draw horizontal lines at the entry, at my stops and targets.
    From this I am interpreting your meaning as you want to orders to be drawn on your chart as if they were drawn like in ChartTrader. This can already be done with the steps I showed you.

    Do you also want to draw a horizontal line below or above the current price, from where an order entered and exited?

    Leave a comment:


  • tonynt
    replied
    Adam

    what are we talking about? You tell me how to enable a strategy? And you tell me how to set PlotExecutions?

    This would be the answer to the question how I can enable a strategy and to the question where I set "plotexecutions".

    I asked how I can plot a Horizontal Line exactly at the price where the entry is done. Isnt this something different from your answer?

    Your answer even doesnt refer to your question that I confirmed "Are you trying to plot a horizontal line where your orders close or where they are entered? "

    Best
    Tony

    Originally posted by NinjaTrader_AdamP View Post
    TonyNT,

    Please see the Capture screenshot. If you right click your chart > go to "Strategies" > You can add a strategy to your chart, and set the "Enabled" field to "True". As you can see, when I hit the "Apply" button the chart is now showing a strategy running on it and an order was plotted for when it entered and exited.

    Please see the Capture2 screenshot. If you right click your chart > go to "DataSeries" > You can set the "PlotExecutions'" field to "TextAndMarker" to get these order plots.
    Last edited by tonynt; 10-09-2012, 11:22 AM.

    Leave a comment:


  • NinjaTrader_AdamP
    replied
    TonyNT,

    Please see the Capture screenshot. If you right click your chart > go to "Strategies" > You can add a strategy to your chart, and set the "Enabled" field to "True". As you can see, when I hit the "Apply" button the chart is now showing a strategy running on it and an order was plotted for when it entered and exited.

    Please see the Capture2 screenshot. If you right click your chart > go to "DataSeries" > You can set the "PlotExecutions'" field to "TextAndMarker" to get these order plots.
    Attached Files

    Leave a comment:


  • tonynt
    replied
    Adam,

    I would like to have the same informations as one would have with chart-trader. As one can not acitvate chart trader when strategies are running I want draw horizontal lines at the entry, at my stops and targets.

    Or what you mean with "Chart Trader Style orde plots"?? Yes, I would like to have this on my chart with NT-script-strategies of course - if possible. How could I do this?

    Thanks
    Tony


    Originally posted by NinjaTrader_AdamP View Post
    tonynt,

    So you don't want to use the "Chart trader" style order plots? These should plot if you use the correct setting.

    Otherwise, please clarify : Are you trying to plot a horizontal line where your orders close or where they are entered?
    Last edited by tonynt; 10-09-2012, 10:20 AM. Reason: clearify

    Leave a comment:


  • NinjaTrader_AdamP
    replied
    tonynt,

    So you don't want to use the "Chart trader" style order plots? These should plot if you use the correct setting.

    Otherwise, please clarify : Are you trying to plot a horizontal line where your orders close or where they are entered?

    Leave a comment:


  • tonynt
    replied
    Adam,

    thank you for your reply.

    Referring the drawing of the horizontal line at entryprice I do not understand what you mean. What do I have to change in my "DrawHorizontalLine("Line1" + Current Bar, true, Low[0]-2+TickSize, Color.White, DashStyle.Dash,2);" when I dont want to have drawn the line at Low [0] or below Low [0] BUT at the price where entry is done?

    Thanks
    Tony




    Originally posted by NinjaTrader_AdamP View Post
    tonynt,

    Either way would work here, drawing the actual draw object just gives you more control over the draw object if needed but it isn't necessary to use the other method you found.

    As far as your other question, strategies should plot these lines if you attach them to your chart and have the "Plot Executions" set appropriately in your "Dataseries" menu.

    Leave a comment:


  • NinjaTrader_AdamP
    replied
    tonynt,

    Either way would work here, drawing the actual draw object just gives you more control over the draw object if needed but it isn't necessary to use the other method you found.

    As far as your other question, strategies should plot these lines if you attach them to your chart and have the "Plot Executions" set appropriately in your "Dataseries" menu.

    Leave a comment:


  • tonynt
    started a topic draw-remove

    draw-remove

    Hello,

    I found in the forum the information concering the question of a fellow how to remove a certain horizontal line to do with

    IHorizontalLine hLine = this.DrawHorizontalLine("line", Close[0], Color.Green);
    this.RemoveDrawObject(hLine);

    Why to do this way?

    When drawing with DrawHorizontalLine (Line1" + Current Bar,.............) one can remove later with RemoveDrawObject("Line1");

    No? Thanks for your reply.

    Another question in this concern. On the support sites all samples for drawing are with High[0] + y TickSize or Low [0] - y TickSize. I didnt find how to draw the horizontalline in a script at the current price position - eg to draw the horizontal line same time as the entry is realized to see the entry price during the trade (because chart trader can not be enabled with strategies)

    Thanks
    Tony

Latest Posts

Collapse

Topics Statistics Last Post
Started by CarlTrading, 03-31-2026, 09:41 PM
1 response
72 views
0 likes
Last Post NinjaTrader_ChelseaB  
Started by CarlTrading, 04-01-2026, 02:41 AM
0 responses
39 views
0 likes
Last Post CarlTrading  
Started by CaptainJack, 03-31-2026, 11:44 PM
0 responses
63 views
2 likes
Last Post CaptainJack  
Started by CarlTrading, 03-30-2026, 11:51 AM
0 responses
63 views
0 likes
Last Post CarlTrading  
Started by CarlTrading, 03-30-2026, 11:48 AM
0 responses
53 views
0 likes
Last Post CarlTrading  
Working...
X