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 helpwanted, Today, 03:06 AM
        1 response
        10 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        9 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        5 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        387 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X