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

indicator to show ATR distance from my last entry

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

    indicator to show ATR distance from my last entry

    i asked chatgpt to write a indicator wich can show with horizontal lines on the chart the distance (above and below) from my last entry. It said it is not possible.

    anyone can help me with a indicator wich shows that?

    #2
    Hello ummagumma,

    Thank you for your post.

    From our experience at this time, AI tools such as ChatGpt are not quite adequate to generate valid compilable NinjaScripts that function as the user has intended. We often find that the generated code will call non-existent properties and methods, use improper classes or inheritance, and may have incorrect logic. We highly encourage that you create a new NinjaScript yourself using the NinjaScript Editor, and use the code generated by AI tools as suggestions and guides when coding the script yourself, rather than using the actual code generated.

    While it is not within our support model to correct these scripts at user request, we would be happy to provide insight for any specific inquiries you may have if you would like to create the script yourself. Our support is able to assist with finding resources in our help guide as well as simple examples, and we are happy to guide you through the debugging process to assist you with understanding unexpected behavior.

    You could programmatically access the ATR price using the ATR() indicator method for the desired barsAgo:


    Then, you could compare that to your entry price to find the distance between the two. In a strategy, Position.AveragePrice provides the average entry price of a strategy-generated position:


    You can also contact a professional NinjaScript Consultant who would be eager to create or modify scripts at your request or assist you with your scripts. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like a list of affiliate consultants who would be happy to create scripts at your request or provide one-on-one educational services. Otherwise, this thread will remain open in case any other members of the forum community would like to assist you with this script.

    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 fx.practic, 10-15-2013, 12:53 AM
    5 responses
    5,403 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by Shai Samuel, 07-02-2022, 02:46 PM
    4 responses
    94 views
    0 likes
    Last Post Bidder
    by Bidder
     
    Started by DJ888, Yesterday, 10:57 PM
    0 responses
    6 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by MacDad, 02-25-2024, 11:48 PM
    7 responses
    158 views
    0 likes
    Last Post loganjarosz123  
    Started by Belfortbucks, Yesterday, 09:29 PM
    0 responses
    8 views
    0 likes
    Last Post Belfortbucks  
    Working...
    X