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 geddyisodin, 04-25-2024, 05:20 AM
        8 responses
        60 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by jxs_xrj, 01-12-2020, 09:49 AM
        4 responses
        3,287 views
        1 like
        Last Post jgualdronc  
        Started by Option Whisperer, Today, 09:55 AM
        0 responses
        5 views
        0 likes
        Last Post Option Whisperer  
        Started by halgo_boulder, 04-20-2024, 08:44 AM
        2 responses
        22 views
        0 likes
        Last Post halgo_boulder  
        Started by mishhh, 05-25-2010, 08:54 AM
        19 responses
        6,189 views
        0 likes
        Last Post rene69851  
        Working...
        X