Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Back Testing Strategy - Drawings Don't Show

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

    Back Testing Strategy - Drawings Don't Show

    I created the most simple initial strategy using Keltner and some signals. Here's the guts of the code developed strictly using Edit Strategy(no personal programming). You can clearly see that once the Keltner Channels are breached, we need a Drawing(shape)....no luck on the back test chart or when employed in a chart. Any ideas???

    // Condition set 1
    if (CrossBelow(Close, KeltnerChannel(1.5, 10).Lower, 1))
    {
    DrawTriangleUp(
    "My triangle up" + CurrentBar, false, 0, 0, Color.Lime);
    }
    // Condition set 2
    if (CrossAbove(Close, KeltnerChannel(1.5, 10).Upper, 1))
    {
    DrawArrowUp(
    "My up arrow" + CurrentBar, false, 0, 0, Color.Red);

    #2
    Debug via print functions to see at which bars the code believes it should be drawing on. Then go back and visit those exact bars to see what is going on. Also you may need to play with the DrawOnPricePanel property.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh - I don't want to get into sophisticated programming; I'm just a trader albiet and engineer ). I did some additional analysis. None of the common drawing shapes show-up such as: Arrows; squares; etc. I did get vertical lines to appear when using the bollinger band excursions based on Close. So unless there's a simple environmental variable controlling the appearance of these Shapes...I'm dead in the water. I want to get reliable signals using the program free strategy wizard...

      Comment


        #4
        Strategy Issue

        NT - Kindly take a quick look and see if you can sort this. Also, the trade strategy is very liberal(almost silly), I'm only getting a few trades although round trips set to 300
        Attached Files

        Comment


          #5
          I fully understand that you may not want to deal with programming. You may want to try contacting one of the NinjaScript Consultants here to get the work done for you: http://www.ninjatrader.com/webnew/pa...injaScript.htm

          Due to bandwidth issues we do not generally review strategies case by case. I did take a quick look at your strategy though. I do not see any oddness in its coding. It should behave exactly as it is programmed to do.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by Ranger View Post
            I created the most simple initial strategy using Keltner and some signals. Here's the guts of the code developed strictly using Edit Strategy(no personal programming). You can clearly see that once the Keltner Channels are breached, we need a Drawing(shape)....no luck on the back test chart or when employed in a chart. Any ideas???

            // Condition set 1
            if (CrossBelow(Close, KeltnerChannel(1.5, 10).Lower, 1))
            {
            DrawTriangleUp(
            "My triangle up" + CurrentBar, false, 0, 0, Color.Lime);
            }
            // Condition set 2
            if (CrossAbove(Close, KeltnerChannel(1.5, 10).Upper, 1))
            {
            DrawArrowUp(
            "My up arrow" + CurrentBar, false, 0, 0, Color.Red);

            You'll find you cant see them because they are lined up on the candles. Adding the variable to offset the drawn image will put arrow below for a buy and above for a sell. I added a simple example below based on your code (Obviously they are both displaced to the lower side as they are UP signals)

            // Condition set 1
            if (CrossBelow(Close, KeltnerChannel(1.5, 10).Lower, 1))
            {
            DrawTriangleUp(
            "My triangle up" + CurrentBar, false, 0, Low[0] - 4 * TickSize, Color.Lime);
            }
            // Condition set 2
            if (CrossAbove(Close, KeltnerChannel(1.5, 10).Upper, 1))
            {
            DrawArrowUp(
            "My up arrow" + CurrentBar, false, 0, Low[0] - 4 * TickSize, Color.Red);
            Last edited by jpbaldwin; 03-12-2009, 10:12 AM.

            Comment


              #7
              Originally posted by Ranger View Post
              NT - Kindly take a quick look and see if you can sort this. Also, the trade strategy is very liberal(almost silly), I'm only getting a few trades although round trips set to 300
              I checked the code and with a Bollinger running 14,2 i didn't get a hit on a 5 min ES chart in over 20 days.

              Firstly you have this problem
              High[0] > High[1] + 5 * TickSize)
              It should be
              High[0] > High[1] - 5 * TickSize)

              Even with that fixed i had to lower the std dev on the Bollinger to 1 to get any triggers

              As for the condition 2 it is doing as it is told and you have many more exit points than entry hence the over abundance of red vertical lines.

              I gave the file a bit of a work over, hopefully it'll help

              Jase
              Attached Files

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Gerik, Today, 09:40 AM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by RookieTrader, Today, 09:37 AM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by alifarahani, Today, 09:40 AM
              0 responses
              5 views
              0 likes
              Last Post alifarahani  
              Started by KennyK, 05-29-2017, 02:02 AM
              3 responses
              1,285 views
              0 likes
              Last Post NinjaTrader_Clayton  
              Started by AttiM, 02-14-2024, 05:20 PM
              11 responses
              186 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Working...
              X