Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bband breakout

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

    Bband breakout

    Hi guys,
    I am new to NT. wanted a bit of help regarding connectivity. I am a profession fx trader just stepped into automation testing on G7 crosses for bband breakouts. I am having a bit difficulty to program without any manual. is there any NT manual available on website where i could get examples

    #2
    amit_rwd, welcome to our forums!

    For starting out with indicators, please check into this link -



    For strategies, please check into this -



    For our 'point and click' strategy wizard interface, this one will be a helpful guide -



    The NinjaScript language reference can be found under the NinjaScript section in our help guide, just press F1 in the software to access it anytime.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks,
      I have downloaded the free trial. If i wanted to test historical data for gbp/jpy is it availabe inside or do i need to connect to another vendor?

      Comment


        #4
        Please use the free Gain / Forex.com connection for this -



        Please ensure to use our servers in Step 5 to have a wider historical data access then.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          inside bar

          Hi ,

          i had a look at the manual thanks . While trading a break of inside bar i am facing a bit problem. the criteria is when a inside bar is established we need to trade a break of low or high of inside bar. An inside bar(IB) has its body engulfed within previous bar.

          So i programmed as below
          high(0) < high(-1) (high of current < then high of previous)
          and low(0) > low (-1) (low of current) > low of previous)
          offset type i have selected price

          then
          shortposition

          but it seems the mechanics are different and i am not getting my results.

          same case with bollinger bands . if i wanted to make sure that the close of candle is greater than uppper band 1 period ago it is saying i canot have negative value
          what is want is some scenario like this
          check if close of current candle > upper band then buy on a break of candle close(above upperband)

          Comment


            #6
            Don't use negatives. One bar back is [1], 2 bars back is [2]. For your code it would look like:

            if(High[0] < High[1] && Low[0] > Low[1])
            do something
            eDanny
            NinjaTrader Ecosystem Vendor - Integrity Traders

            Comment


              #7
              edanny many thanks it worked .. i was used to saxotrader platform wherby i was using negative values...

              Comment


                #8
                Hi danny sorry to be pain . order management if i would like to take profit when price = middle band how can i do that. I also want to put my stop on the high price of previous candle high(0).
                I have only limited options in take profit section wherby strategy actions are limited.

                Comment


                  #9
                  Are you working in the wizard amit_rwd? Then you could check for price being equal to the middle band and then issue a ExitLong / ExitShort command - http://www.ninjatrader-support.com/H...APosition.html

                  For the stop you can check if your strategy position is long / short and then place an ExitLongStop / ExitShortStop order at this price as a condition.
                  BertrandNinjaTrader Customer Service

                  Comment


                    #10
                    Hi I tried the command where getcurrentask() <= sma(20)[0] but it seems that as soon as the price touches the middle band(sma20) it doesnt book profit but instead it waits for a close of candle and closes.
                    what i mean from above command is if i have shorted on top of band then cover the position when current ask price is equal to or less than 20 ma price. ( Less indicates if price has closed below 20 ma then value will be less than current 20 ma)
                    [IMG]file:///C:/Users/boxr/AppData/Local/Temp/moz-screenshot.jpg[/IMG][IMG]file:///C:/Users/boxr/AppData/Local/Temp/moz-screenshot-1.jpg[/IMG]

                    Comment


                      #11
                      amit_rwd, this is expected for backtesting and for running the strategy in realtime with CalculateOnBarClose = true - http://www.ninjatrader-support.com/H...BarClose1.html
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        GUys any idea how to put sell limits ar pivots . for example
                        if certain criteria is met

                        then do this

                        enterselllimit at R1 of pivot

                        (right now i am having some error and its not placing my sell limit)

                        Comment


                          #13
                          Hello,

                          Are you placing the limit orders above the market for a sell and below for a buy? This link may help:

                          Post your code and we can help more.
                          DenNinjaTrader Customer Service

                          Comment


                            #14
                            i am entering limit to sell only . but what i want todo is put the sell limit wherethe R1 price of pivot is. so if R1 is say 90.45 for usd/jpy then i want NT to put a sell limit at R1= 90.45 which is above current market price say 90.00

                            Comment


                              #15
                              Hello,

                              Yes, you can. Post your order line of code and I'll try to help.
                              DenNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by pmachiraju, 11-01-2023, 04:46 AM
                              8 responses
                              148 views
                              0 likes
                              Last Post rehmans
                              by rehmans
                               
                              Started by mattbsea, Today, 05:44 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post mattbsea  
                              Started by RideMe, 04-07-2024, 04:54 PM
                              6 responses
                              33 views
                              0 likes
                              Last Post RideMe
                              by RideMe
                               
                              Started by tkaboris, Today, 05:13 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post tkaboris  
                              Started by GussJ, 03-04-2020, 03:11 PM
                              16 responses
                              3,283 views
                              0 likes
                              Last Post Leafcutter  
                              Working...
                              X