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 futurenow, 12-06-2021, 05:49 PM
                          18 responses
                          879 views
                          0 likes
                          Last Post dj0ntz
                          by dj0ntz
                           
                          Started by nailz420, 05-14-2025, 09:14 AM
                          1 response
                          119 views
                          0 likes
                          Last Post NinjaTrader_ChristopherJ  
                          Started by NinjaTrader_Brett, 05-12-2025, 03:19 PM
                          0 responses
                          526 views
                          1 like
                          Last Post NinjaTrader_Brett  
                          Started by domjabs, 05-12-2025, 01:55 PM
                          2 responses
                          85 views
                          0 likes
                          Last Post domjabs
                          by domjabs
                           
                          Started by Morning Cup Of Trades, 05-12-2025, 11:50 AM
                          1 response
                          124 views
                          0 likes
                          Last Post NinjaTrader_ChristopherJ  
                          Working...
                          X