Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Stochastic crossover

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

    Stochastic crossover

    I am trying to use a stochastic crossover in my strategy. I wasn't quite sure how to do it, so using the wizard I clicked on stoch. then zeroed out period d & smooth, left period K at 14, hit cross above then on the right box hit stoch. zeroed out period k & smooth, left period d at 7. I used this to trigger my entry. It seems to work although not every entry seems to coincide with a stoch. crossover on the chart. Is this the correct way to do this?

    Thanks in advance

    #2
    Hello,

    If I'm following you correctly, you want to leave all the input parameters the same so that you're comparing the same exact series on both ends.

    If you're checking for a cross, you want to select the "plot" you wish to check for the cross over.

    I've attached a screen shot that shows the Stochastic K CrossAbove the Stochastic D.
    Attached Files
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thanks, Matthew, I set up my strategy like the screenshot, with the action being to enter a trade, but it is doing it after the crossover. For example, the crossover on a 60 min. chart is at 9:00am but the trade isn't executed until 10:00am. Is that correct?

      Comment


        #4
        I also noticed on the sample ma crossover that the entries are occurring after the crossover.

        Comment


          #5
          Hello snotrag12,

          Thank you for your response.

          If this is occurring on real-time data set the CalculateOnBarClose option for the Strategy (when enabling or editing the strategy on the chart or Strategies tab) to False.

          Please let me know if I may be of further assistance.

          Comment


            #6
            Actually this is occurring on strategy backtests, and I did have calculate on bar close checked

            Comment


              #7
              In backtesting this would be expected, as only in realtime or Market Replay testing the intrabar formation would be available to work with CalculateOnBarClose = false.

              In backtesting the first possible trade location per default is the open of the next candle after which your signal was triggered.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                In reference to the previous post where Bertrand informed me that in backtesting, the entry occurs at the next candle following the trigger, as opposed to realtime testing, I was wondering if anybody has compared the two, and if it makes a significant difference in outcomes?

                Comment


                  #9
                  Originally posted by snotrag12 View Post
                  In reference to the previous post where Bertrand informed me that in backtesting, the entry occurs at the next candle following the trigger, as opposed to realtime testing, I was wondering if anybody has compared the two, and if it makes a significant difference in outcomes?
                  Entries are delayed by one bar: it usually makes a significant difference.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by lightsun47, Today, 03:51 PM
                  0 responses
                  5 views
                  0 likes
                  Last Post lightsun47  
                  Started by 00nevest, Today, 02:27 PM
                  1 response
                  9 views
                  0 likes
                  Last Post 00nevest  
                  Started by futtrader, 04-21-2024, 01:50 AM
                  4 responses
                  45 views
                  0 likes
                  Last Post futtrader  
                  Started by Option Whisperer, Today, 09:55 AM
                  1 response
                  14 views
                  0 likes
                  Last Post bltdavid  
                  Started by port119, Today, 02:43 PM
                  0 responses
                  9 views
                  0 likes
                  Last Post port119
                  by port119
                   
                  Working...
                  X