Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Drawing stop and profit levels

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

    Drawing stop and profit levels

    Hello,

    I would like to ask for some help how to draw line/dots which will be presenting profit and stop loss limit. I would like to use strategy builder for that. I do not have issue with drawing on dot but I my target is to have drawn until profit or stop loss is reached. I am sending example how it should look like.

    Is such drawing option available through strategy builder?

    Thank you

    Click image for larger version

Name:	image.png
Views:	83
Size:	11.3 KB
ID:	1221783

    #2
    Hello MiroslavH,

    Thank you for your post.

    When working with an unlocked strategy in the NinjaScript Editor, you can certainly track certain orders and create conditions that draw on your chart once an order is filled. In the Strategy Builder, there are certain limitations. You could potentially set up a bool variable that is false by default, sets to true when a position is opened, and then check for when the position changes to flat (meaning a stop or target was filled) and then at that moment draw on the chart and then set the bool back to false to "rearm" it for the next entry. This would look something like the following example where an email is shared when the stop loss or profit target is hit:


    In your scenario, you would want to change the action from SendMail to the Draw action to draw a dot at the Close[0] price where the action was triggered.

    For additional information about some of the conditions and actions available in the Strategy Builder, please see the following pages:



    Please let us know if we may be of further assistance.

    Emily C.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by tsantospinto, 04-12-2024, 07:04 PM
    7 responses
    126 views
    0 likes
    Last Post aligator  
    Started by futtrader, 04-21-2024, 01:50 AM
    5 responses
    56 views
    0 likes
    Last Post NinjaTrader_Eduardo  
    Started by PeakTry, Today, 10:49 AM
    0 responses
    2 views
    0 likes
    Last Post PeakTry
    by PeakTry
     
    Started by llanqui, Today, 10:32 AM
    0 responses
    5 views
    0 likes
    Last Post llanqui
    by llanqui
     
    Started by StockTrader88, 03-06-2021, 08:58 AM
    45 responses
    3,994 views
    3 likes
    Last Post johntraderuser2  
    Working...
    X