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 bjgjkhjuhgtybg, Today, 04:38 AM
    0 responses
    2 views
    0 likes
    Last Post bjgjkhjuhgtybg  
    Started by varun12343, Today, 03:09 AM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by Lance El Camino, Yesterday, 04:14 PM
    2 responses
    25 views
    0 likes
    Last Post NT-Roland  
    Started by MatthewLesko, Yesterday, 11:13 PM
    1 response
    14 views
    0 likes
    Last Post NT-Roland  
    Started by kevinenergy, Today, 01:44 AM
    0 responses
    7 views
    0 likes
    Last Post kevinenergy  
    Working...
    X