Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using Strategy in Workspace

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

    Using Strategy in Workspace

    Hello,

    I have strategy which work in Strategy Analyzer. But when I try use the same strategy in my workspace, nothing happend od my chart. There is no information about any problem. For the first view it looks that everything is all right, but strategy doesn't color bars (strategy should color bars which do properly conditions).

    This is the code:

    protected override void OnBarUpdate()
    {
    // Condition set 1

    if (CurrentBar < 60)
    return;


    if (Close[0] > Close[20]
    && Close[0] > Close[60])
    {
    BarColor = Color.Green;

    }
    if (Close[0] < Close[20]
    && Close[0] < Close[60])
    {
    BarColor = Color.Red;

    }

    }


    Please, help me.

    Thanks
    Daniel

    #2
    Daniel, after applying and enabling the strategy (for NT7) - do you see any errors shown in the log tab of the Control Center?

    Thanks,

    Comment


      #3
      Hello,

      I am using NT 6.5 and there is no information about errors in log tab.

      I checked other strategy and it also doesn't work.

      Daniel

      Comment


        #4
        Do you run this from the chart directly or from the strategies tab in the Control Center?

        Strategies started from the tab would not be visualized on the chart.

        Comment


          #5
          I started on the chart.

          File/new/chart... then I chose index S&P daily. When the bars are uploaded I click on the icon (yellow circle with "s" inside) and I chose my strategy. I clicked "OK" and nothing happend.

          Daniel

          Comment


            #6
            That would be unfortunately expected for NinjaTrader 6.5, backtesting on indices data would not be supported - if you change for example to SPY or INTC stocks it would work, correct?

            Comment


              #7
              Sorry but I dont understand. Can you tell me what "SPY or INTC" mean?

              Comment


                #8
                Those are just regular stocks / ETF's, the INTC (Intel) stock is for example on your DOW30 instrument list.

                Comment


                  #9
                  It still doesn't work. I connected with yahoo and I open chart of INTC and I run my strategy and still nothing. Maybe I can send you my strategy and you will be able to check it on your software?

                  Daniel

                  Comment


                    #10
                    For sure, you can export it and attach it here or please send me a note to support at ninjatrader dot com with the file to test - to compare : would the SampleMACrossover work as expected on your Yahoo daily stock charts?

                    Thanks,

                    Comment


                      #11
                      Hello,

                      I am sending strategy as the attachment. SampleMACrossover doesn't work as well.

                      Daniel
                      Attached Files

                      Comment


                        #12
                        Hello Danielj,

                        It works OK here. I'm getting some color changes to bars.

                        and I chose my strategy. I clicked "OK" and nothing happend.

                        Is the strategy actually applied to a chart? Double click in the list to add it to the chart and it will show up in the window at the bottom. Screenshot attached to verify it's applied to the chart.
                        Attached Files
                        Last edited by NinjaTrader_RyanM1; 11-30-2010, 02:08 PM.
                        Ryan M.NinjaTrader Customer Service

                        Comment


                          #13
                          Sorry for taking your time. I didin't click twice...Sorry. It is ok now.

                          Thanks
                          Daniel

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by NullPointStrategies, Today, 05:17 AM
                          0 responses
                          23 views
                          0 likes
                          Last Post NullPointStrategies  
                          Started by argusthome, 03-08-2026, 10:06 AM
                          0 responses
                          120 views
                          0 likes
                          Last Post argusthome  
                          Started by NabilKhattabi, 03-06-2026, 11:18 AM
                          0 responses
                          63 views
                          0 likes
                          Last Post NabilKhattabi  
                          Started by Deep42, 03-06-2026, 12:28 AM
                          0 responses
                          41 views
                          0 likes
                          Last Post Deep42
                          by Deep42
                           
                          Started by TheRealMorford, 03-05-2026, 06:15 PM
                          0 responses
                          45 views
                          0 likes
                          Last Post TheRealMorford  
                          Working...
                          X