Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy not running after connection?

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

    Strategy not running after connection?

    Greetings,

    I seem to have been able to connect to a demo account at MB Trading, created a NT Strategy, and "turned on" the strategy under the "Strategies" Tab...however nothing seems to be happening. I wish to send automated trade signals to the demo but NT seems to be doing nothing at all after connecting...I have a screenshot of my strategy setups showing that they seem to be running and the connection has been made. What could the problem be here? Also should NT also be downloading tick data from MB after the connection has been made?

    Thanks in advance for any suggestions.
    Attached Files

    #2
    You would need to debug you strategy as per here: http://www.ninjatrader-support.com/v...ead.php?t=3418

    Comment


      #3
      MBT does not offer historical data and thus NinjaTrader will not download anything.
      RayNinjaTrader Customer Service

      Comment


        #4
        Thanks for the info. I've added a bunch of "Print" statements to my indicator to try and determine what is going on with it. Where am I supposed to see these print statements print out??

        Comment


          #5
          Tools->Output window

          Comment


            #6
            Thanks. So what am I to do if the "Output Window" is blank? Even if after I know conditions have occured which should have led to a (attempted) trade signal?

            Comment


              #7
              If you have a Print() statement in a manner such as:

              if (myCondition == true)
              {
              Print("myCondition is true");
              EnterLong();
              }

              and you see nothing in the Output window it means that your condition truly has not been met, at least programattically.
              RayNinjaTrader Customer Service

              Comment


                #8
                Oh, well no...I simply added Print statements after each line of calculation in my code in an attempt to see how/what was being calculated, like this:


                FirstInside.Set(Close[
                0] - (0.5 * (MAX(High, Lp)[0] + MIN(Low, Lp)[0])));
                Print(
                "Code has entered first statement. Close: " + Close[0] + " FirstInside: " + FirstInside[0]);
                Inside1 = EMA(FirstInside, Sm)[
                0];
                Print(
                "Code has entered second statement. " + Inside1);

                etc...

                Do I have to do something like:

                If(Inside1 > 0)
                {
                Print("Code has entered second statement. " + Inside1);
                }

                If that is the case, then nothing will print if "Inside1" is <= 0...which could be the case in a situation where the code has been written incorrectly...

                Comment


                  #9
                  BTW the print statements are in my INDICATOR, not my strategy...should they be there instead? If I do so I'll have to "unlock" the code from the wizard and then would be unable to use the wizard again for future changes/additions, correct?

                  Comment


                    #10
                    If you are trying to figure out why your strategy is not executing you are best served by adding Print() statements in the strategy code. At this time, you can add Print() within the Strategy Wizard but you can only output user defined messages and not internal variables, indicator values etc... If you wanted more granular output messages you would have to unlock the code and you would not be able to use the wizard again. For the purpose of just printing out a message if a trade signal condition occured, the wizard should be sufficient.
                    RayNinjaTrader Customer Service

                    Comment


                      #11
                      Thank you. I could try that but I already know that trading signals are not being generated when conditions are right. I'm trying to find out why that is the case. Would I not be best served by knowing what the indicator values are and how they are being calculated? Is it not possible to "Print" those lines in my indicator code to the "Output Window"?

                      Comment


                        #12
                        To see how your indicator is running you can place your print functions in the indicator file. Load a chart and put that indicator onto the chart and you will see your outputs.

                        When you want to diagnose entry conditions you will want to place print functions into the strategy itself. This will allow you to see the actual values being compared at the moment for your if conditions. To actually see the values being compared from an indicator perspective is a lot of unnecessary work. You will need to sift through hundreds of lines of output to find the one corresponding with the exact moment in time the strategy wants to trade.
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #13
                          OK, thank you. Does NT have any default charts to load? At the moment I have none because I have to format my historical data correctly before loading into NT...and because (as I was informed earlier) MB Trader doesn't download anything when the connection is on.

                          In the meantime I'm going to unlock the code within my strategy and place Print statements in there to see what I can see...

                          Comment


                            #14
                            Unfortunately NinjaTrader is not a data provider and has no data to load charts with. You can see our list of data providers here: http://www.ninjatrader-support.com/H...HistoricalData

                            I recommend you setup a connection to get Yahoo's data. It is free. You can also try OpenTick which is also free. If you want real-time data from them then they charge only the nominal exchange fees.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #15
                              Thanks, does the Yahoo download require anything from me other than establishing the connection? If that is all that is required then how does the data get into NT? I understand Yahoo provides only "Daily" data but that's OK for now.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by ursavent, Today, 12:54 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post ursavent  
                              Started by Mizzouman1, Today, 07:35 AM
                              3 responses
                              17 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by RubenCazorla, Today, 09:07 AM
                              2 responses
                              13 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by i019945nj, 12-14-2023, 06:41 AM
                              7 responses
                              82 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by timmbbo, 07-05-2023, 10:21 PM
                              4 responses
                              158 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Working...
                              X