• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

My First indicator

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

    My First indicator

    Hi I am writing an indicator as a means to learn C# and Ninja Script

    The basic concept of what I am trying to do is write an indicator that draws 4 lines on a chart and then moves an arrow around the chart based on how prices crosses the lines. This indicator serves no purpose other than as an exercise I am using to develop my coding skills.

    I have coded most of the framework of what I am trying to do, but have got a bit stuck finding the Y value (the price) of the draw line objects.

    I used stopValue = DrawObjects[stopTagName].GetValue(); with stopValue and stopTagName being two double varibles.

    The error I am getting on compile is IDrawingTool which is the parent for DrawObjects, does not have the GetValue definition.

    So my question for this post is how do you find the Y value (the Y value being a parameter each drawobject has) of any object, so I can add that to my stopValue variable?

    attached is the code I have written, there are more compile errors than mentioned here, the intent is to work threw each solving the issues and eventually getting the indicator working.

    I am sure there are better ways to approach the exercise, but as I have already said this is my first attempt at coding so I am expecting some of my code to be naïve. Also the over commented sections are for my benefit more so than others.PriceCrossingLines20161108.zip

    #2
    Hello EastLondonKiwi,

    Thanks for your post.

    As there are a number of items to discuss, please send an e-mail to PlatformSupport[at]NinjaTrader[dot]com. Set the subject to Atten: Paul and a link to this thread.

    Thank-you.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Email sent

      Comment


        #4
        Hello EastLondonKiwi,

        Thanks for your post. I have replied via e-mail.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by xsgex, Yesterday, 09:46 PM
        0 responses
        2 views
        0 likes
        Last Post xsgex
        by xsgex
         
        Started by Steve L, Yesterday, 09:36 PM
        0 responses
        1 view
        0 likes
        Last Post Steve L
        by Steve L
         
        Started by krugman25, Yesterday, 09:34 PM
        0 responses
        4 views
        0 likes
        Last Post krugman25  
        Started by indy73, Yesterday, 04:42 PM
        0 responses
        15 views
        0 likes
        Last Post indy73
        by indy73
         
        Started by Italianforex, Yesterday, 06:20 AM
        2 responses
        13 views
        0 likes
        Last Post gplatis
        by gplatis
         
        Working...
        X