Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bband breakout

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

    #16
    here is the code i paste
    // This namespace holds all strategies and is required. Do not change it.
    namespace NinjaTrader.Strategy
    {
    /// <summary>
    /// The system enters sell limts at R1 at london open if price is trading below pivot point
    /// </summary>
    [Description("The system enters sell limts at R1 at london open if price is trading below pivot point")]
    public class PivotR1 : Strategy
    {
    #region Variables
    // Wizard generated variables
    private int myInput0 = 1; // Default setting for MyInput0
    // User defined variables (add any user defined variables below)
    #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()
    {
    SetStopLoss("", CalculationMode.Ticks, 40, false);
    SetProfitTarget("", CalculationMode.Ticks, 20);

    CalculateOnBarClose = true;
    }

    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {
    // Condition set 1
    if (ToTime(Time[0]) >= ToTime(7, 0, 0)
    && Close[0] < Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 20).R1[0])
    {
    EnterShortLimit(DefaultQuantity, Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 20).R1[0], "");
    }
    }

    #region Properties
    [Description("")]
    [Category("Parameters")]
    public int MyInput0
    {
    get { return myInput0; }
    set { myInput0 = Math.Max(1, value); }
    }
    #endregion
    }
    }

    what i want is the system toplace sell order at R1 pivot point. Is there any system which trades fibonacci points of swing highs

    Comment


      #17
      What's the issue you have with this code posted? That the order expires after one bar?

      This would be expected, try setting it to liveUntilCancelled -

      Code:
       
      EnterShortLimit(0, true, DefaultQuantity, Pivots(PivotRange.Daily, HLCCalculationMode.DailyBars, 20).R1[0], "");
      BertrandNinjaTrader Customer Service

      Comment


        #18
        is there a function like live until cancelled or do i have to manually program it.

        Comment


          #19
          You would unfortunately step outside the wizard to use this, like with the overload I've put in below...
          BertrandNinjaTrader Customer Service

          Comment


            #20
            thx NT bertrand
            I have tried but it seems it still not triggering it . i will have to figure it out. Also wanted to ask i saw a lot of articles about NT pivot time setting but still having a bit error in pivot calculation. Basically i want pivots to be calculates as of london time ..
            Further to this is there any way i could calculate pivotal midpoints. like (r1+r2)/2

            Comment


              #21
              You would need to setup your chart session times to reflect London time then (based on your local set PC clock and timezone).

              I believe the first script shared under this link does the midpoint calculations also for you - http://www.ninjatrader-support2.com/...idpoint&desc=1
              BertrandNinjaTrader Customer Service

              Comment


                #22
                what risk free rate does the ninja trader software use for sharpe ratio calculation in strategy analyzer
                Last edited by amit_rwd; 11-27-2009, 05:57 PM.

                Comment


                  #23
                  fibonccci

                  Hi
                  guys is any one of you tried to program fibonacci with swing trading. I am not talking about indicator.
                  example
                  if i want to buy at certain fibonacci level of swing high swinglow .
                  the swing high/low could be a larger wave of last 5 days or can be as small as 1 day )
                  If any one who has good nt programming skills wants to collabrate with me on this small strategy pls pm me. This is asmallpart of my entries in big model

                  regards,
                  Amit

                  Comment


                    #24
                    Amit, as another option, you could contact one of our 3rd party NinjaScript consultants.
                    AustinNinjaTrader Customer Service

                    Comment


                      #25
                      thanks NT_austin
                      i also wanted to know the NT software calculates sharpe ratio what is the value of risk free rate used. I presume it has been fed into system and i can't change it?

                      secondly i have query about swing indicator if i write the code below
                      Swing(5).SwingHigh[0]
                      does it mean the high of current bar is swing high and there has been 5 upbars from previous swing low?

                      Comment


                        #26
                        The risk free rate of return is preset at 0 - http://www.ninjatrader-support.com/H...arpeRatio.html

                        The '5' for the Swing indicator is your strength input, the bars to the left / right needed from each swing point - http://www.ninjatrader-support.com/H...eV6/Swing.html
                        BertrandNinjaTrader Customer Service

                        Comment


                          #27
                          get high of a range

                          Is it possible to get the high/low of a range using strategy builder (without manually coding)
                          i want the high/low between 8:00 am and 14:00pm to be used for conditional entries like say if the high is 1.4000 for eur/usd for this period.

                          so i can build a condition saying if high [0] >1.4000 at aytime after 14:00 then buy .

                          Comment


                            #28
                            sorry
                            i figured it out thx guys

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by giulyko00, Today, 11:49 AM
                            2 responses
                            11 views
                            0 likes
                            Last Post giulyko00  
                            Started by Aviram Y, Today, 06:03 AM
                            2 responses
                            10 views
                            0 likes
                            Last Post Aviram Y  
                            Started by FishTrade, Today, 03:42 PM
                            0 responses
                            1 view
                            0 likes
                            Last Post FishTrade  
                            Started by Richozzy38, Today, 01:06 PM
                            3 responses
                            14 views
                            0 likes
                            Last Post Richozzy38  
                            Started by ttrader23, Today, 09:04 AM
                            2 responses
                            12 views
                            0 likes
                            Last Post ttrader23  
                            Working...
                            X