Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

New to Ninjascript need help

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

    New to Ninjascript need help

    Hi All,
    Seems like great community by just lookat at the forum. I am new to Ninjascript and need some help. I like to achieve the following and just want to verify that my code is right.

    1. Price clearly above Bollinger bands

    2. MACD histogram above zero line

    3. RSI above 50

    My code is

    if (CrossAbove(Close, Bollinger(2, 14).Lower, 1)
    && MACD(12, 26, 9).Avg[0] > 0
    && RSI(14, 9).Avg[0] > RSIup)

    Thanks in advance.
    Bill

    I am actually trying to automate or auto trade the following but it only shows I order for the whole year.



    I am not sure what I am doing wrong. Can someone create the stregedy and post it please.
    Last edited by billsingh; 10-26-2014, 03:23 PM.

    #2
    Hello Bill,

    Thank you for your post and welcome to the NinjaTrader Support Forum!

    Your code appears to be correct. What are seeing that is not expected?

    Comment


      #3
      Here is the whole code. it only produce one order for the whole year.
      Attached Files

      Comment


        #4
        Hello billsingh,

        Thank you for your response.

        Can you provide a screenshot of the settings used in the Strategy Analyzer? What instrument are you testing?

        Comment


          #5
          Hello billsingh,

          Thank you for your patience.

          It seems we are working via e-mail as well. I will continue to follow up with you via e-mail.

          Comment


            #6
            Originally posted by billsingh View Post
            Here is the whole code. it only produce one order for the whole year.
            Your code has this: (which is enforcing a 3:45:00pm time for all conditions?

            Code:
                            && ToTime(Time[0]) > ToTime(10, 0, 0)
                            && ToTime(Time[0]) == ToTime(15, 45, 0)
            Did you mean this? (between 10:00:00am and 3:45:00 pm)

            Code:
                            && ToTime(Time[0]) > ToTime(10, 0, 0)
                            && ToTime(Time[0]) [B]<[/B] ToTime(15, 45, 0)

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            66 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            149 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            162 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            99 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            286 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Working...
            X