Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

My Questions

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

    #16
    Yes you can do it without the Wizard. You will need to press the "Unlock Code" button and manually code it.

    Use the CrossAbove() method like this:
    Code:
    if (CrossAbove(Close, SMA(10), 1))
         EnterLong();
    Josh P.NinjaTrader Customer Service

    Comment


      #17
      @ Josh

      Sorry, that was a mistake!
      I have already the script unlooked and programm some code, but now I have the idea to but in an new Indicator in, and I want to change the parameter for it in the Backtestmenue.
      Do you now what I mean?
      Wow I can do this in the script?
      Can you give me an Example?
      Last edited by Hugo1; 06-10-2008, 03:48 AM.

      Comment


        #18
        For Example:

        Under Initialize()

        Add(SMA(fast)); //My Inidi
        _____________________________
        #region Variables
        private int fast = 20 ;//My Parameter witch I like to can change
        #endregion


        That not works- its only for the Wizzard.
        Where I must put (fast= 20)???

        Comment


          #19
          I suggest taking a look at SampleMACrossOver strategy to understand the basic concepts.

          Comment


            #20
            Bug?

            I tryed this Exit for a System:


            if(Position.MarketPosition == MarketPosition.Long &&
            BarsSinceEntry() >= 1 )
            ExitLongStop(Low[0]);


            This works NOT!
            When I Exit with the normal EXITLONG then it works!
            Is this a BUG?

            Comment


              #21
              There is no bug --> Logic issue in your code. You will need to debug it to see whats going on.
              RayNinjaTrader Customer Service

              Comment


                #22
                @ Ray

                What do you mean with debug? Shold I click on DebugMode?
                Wenn I compile the Code there is no Error!

                Comment


                  #23
                  Please see this - http://www.ninjatrader-support.com/v...ead.php?t=3418
                  RayNinjaTrader Customer Service

                  Comment


                    #24
                    What is false?

                    Here is my testscript.
                    Compilation is ok, but I can not get backtest results.
                    Can someone take a look and give me a feedback what is false?
                    It must be a problem with the Paramter for the SMA Periode- somthing must be wrong there?! But what?

                    #region Using declarations
                    using System;
                    using System.ComponentModel;
                    using System.Diagnostics;
                    using System.Drawing;
                    using System.Drawing.Drawing2D;
                    using System.Xml.Serialization;
                    using NinjaTrader.Cbi;
                    using NinjaTrader.Data;
                    using NinjaTrader.Indicator;
                    using NinjaTrader.Gui.Chart;
                    using NinjaTrader.Strategy;
                    #endregion

                    // This namespace holds all strategies and is required. Do not change it.
                    namespace NinjaTrader.Strategy
                    {
                    /// <summary>
                    /// Enter the description of your strategy here
                    /// </summary>
                    [Description("Enter the description of your strategy here")]
                    public class Test1 : Strategy
                    {
                    #region Variables
                    private int periode = 10 ;

                    #endregion

                    /// <summary>
                    /// This method is used to configure the strategy and is called once before any strategy method is called.
                    /// </summary>
                    protected override void Initialize()
                    {
                    CalculateOnBarClose = true;



                    }

                    /// <summary>
                    /// Called on each bar update event (incoming tick)
                    /// </summary>
                    protected override void OnBarUpdate()
                    {
                    //EnterLong
                    if(Position.MarketPosition == MarketPosition.Flat &&
                    Close[0] < Low[1] &&
                    Close[1] > SMA(Periode)[1])
                    EnterLongLimit(Low[0]);


                    if(Position.MarketPosition == MarketPosition.Long &&
                    BarsSinceEntry() == 10)
                    ExitLong();






                    }

                    #region Properties
                    [Description("SMA Periode")]
                    [Category("Parameters")]
                    public int Periode
                    {
                    get{return periode;}
                    set{periode = value;}
                    }




                    #endregion
                    }
                    }

                    Comment


                      #25
                      Please proceed as per Ray's post below. Also: http://www.ninjatrader-support.com/v...ead.php?t=3170

                      Comment


                        #26
                        Ok, Thank you, I got it !

                        Comment


                          #27
                          Pips?sub pip support???

                          When I click the Option(FX sub pip support) what is that?
                          I see if it is not click on then a stoploss of 10 Pips is 10.
                          But when I click on then for a stop of 10 Pips I must write 100 in then code?
                          is that true???

                          Comment


                            #28
                            Depends on if you have subpip data or not I think. You can just give it a try either way. See what kind of stop loss is created and adjust accordingly.
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #29
                              No ExitSignal

                              I have running a system on a chart and it seems to run correct, but the probelem is that I have no Exitsignal plot on then chart? The Entysignal is there. I have connect to my IB Paperaccount.
                              I have adjust all like in the Helpguide for my IB account, but the problem is the same?
                              What else could be the reason for this problem ?

                              Comment


                                #30
                                All executions are plotted on the chart that is generated by your strategy when the strategy is running. If you see no exit executions then your strategy likely never exits.
                                RayNinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                601 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                347 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                103 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                559 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                558 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X