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

simple bar painting based on open/close positions

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

    simple bar painting based on open/close positions

    Good evening. New NinjaScript developer here. I'm trying to develop a very simple piece of code:

    1. paint the bar blue if the bar open occurs in the bottom 1/3 of the range and the close occurs in the top third of the range.

    2. paint the bar pink if the reverse (opens top third and clsoes bottom third).

    It should be pretty simple. I'll attach the file to the post.

    What am I leaving out? The compile errors state:
    Indicator\RangeBars.cs Method name expected CS0149

    I'm sure it's just a simple declaration I'm leaving out somewhere. Can anyone offer some assistance? I'd really appreciate it. Thanks in advance.
    Last edited by paschall; 09-15-2009, 09:04 PM.

    #2
    paschall, Welcome to the forums!

    Instead of:
    if (Open[0] >= (Low[0]+ .66(Range)) && Close[0] <= (Low[0]+ .33(Range)))

    Try this:
    if (Open[0] >= (Low[0]+ .66*Range()[0]) && Close[0] <= (Low[0]+ .33*Range()[0]))

    The other line will have to be tweaked just like the one above.
    AustinNinjaTrader Customer Service

    Comment


      #3
      thank, NT_Austin!

      Thanks, NT_Austin, I'll give it a try.

      It seems that my MATLAB got in the way of my NinjaScript. Not at all unlike when I was in Brazil. My "Portunol" (a unique blend of spanish and portuguese spoken only by me, it seems) made it almost impossible to communicate, even though people generally FELT like they knew what I was trying to say. hahaha.

      Thanks agian. I'll try it out as soon as I finish here.

      cheers,
      D

      Comment


        #4
        No problem, paschall. Let us know if you have any more questions.
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Jonafare, 12-06-2012, 03:48 PM
        5 responses
        3,985 views
        0 likes
        Last Post rene69851  
        Started by Fitspressorest, Today, 01:38 PM
        0 responses
        2 views
        0 likes
        Last Post Fitspressorest  
        Started by Jonker, Today, 01:19 PM
        0 responses
        2 views
        0 likes
        Last Post Jonker
        by Jonker
         
        Started by futtrader, Today, 01:16 PM
        0 responses
        7 views
        0 likes
        Last Post futtrader  
        Started by Segwin, 05-07-2018, 02:15 PM
        14 responses
        1,792 views
        0 likes
        Last Post aligator  
        Working...
        X