Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Drawing the Stop Price on the Chart

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

    Drawing the Stop Price on the Chart

    How can we draw a curve on the chart which show the value of the Trail Stop for each bar when there is an order active?

    I have tried many difference things but nothing works.

    I have managed to draw huge ugly dots on the chart at any location, but I cannot capture the value of the Trail Stop as it changes and I cannot draw a line on a chart.

    Is there an example of this in the NT help guide somewhere? The same would be useful for the Profit Target.
    Attached Files
    Last edited by AlgoJason; 02-12-2018, 07:18 PM. Reason: Add example

    #2
    Hello,

    Thank you for the post.

    To capture the trail stop, you could use the OnOrderUpdate override you have in the script currently. In nearly the same way that you are checking for the entry, you can look for the trailing stop.

    I don't see that you currently have a trailing stop order in the script so you would need to add that first so OnOrderUpdate is called for the trailstop.

    Once you have a trailstop, you can draw the dot where you set the stop price, or look for an order with the trailstops name, you can see its name by Printing the order object or by looking in the orders tab.

    For each of the order changes the trailstop has, the dot could be updated/added from OnOrderUpdate.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by MatthewLesko, Today, 11:13 PM
    0 responses
    3 views
    0 likes
    Last Post MatthewLesko  
    Started by Lance El Camino, Today, 04:14 PM
    1 response
    13 views
    0 likes
    Last Post s.kinra
    by s.kinra
     
    Started by jtrading82, Today, 04:56 PM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ShawnB  
    Started by dmking, Today, 06:00 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_EricB  
    Started by WHICKED, Today, 03:23 PM
    1 response
    15 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X