Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Builder help

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

    #31
    Hello Dolfan,

    Thanks for your reply.

    I have attached an example strategy builder strategy that is exactly the same as SampleMAcrossover that you can view in the strategy builder and can run the optimizer on. From this example, you can see how to relate the user inputs to the period of the moving averages. It is the user inputs that you can optimize.

    Here is a basic guideline of how to Import NinjaScripts.

    To import NinjaScripts you will need the original .zip file.

    To Import
    1. Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
    2. From the Control Center window select the menu Tools>import>Ninjascript add-on..
    3. Select the downloaded .zip file
    4. NinjaTrader will then confirm if the import has been successful.

    Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

    SampleMaCrossoverStrategyBuilderExample.zip
    Paul H.NinjaTrader Customer Service

    Comment


      #32
      Paul,

      After 2 pages, this is EXACTLY what I was looking for. :-) Inputs and Variables is where I put the data, yes? Do i simply put various integers here and they are usable per bar type? For example if I set an integer for 5, can I call it to test a 5 minute bar and a Renko 5 bar, albeit in different optimizations?

      Dolfan
      Last edited by Dolfan; 08-31-2020, 07:49 AM. Reason: Spelling

      Comment


        #33
        Hello Dolfan,

        Thanks for your reply.

        No, to optimize a data series, please see post#23.

        Paul H.NinjaTrader Customer Service

        Comment


          #34
          My humblest apologies Paul. I have been so focused on the Ninjatrader training video that describes manipulating the Parameters that I glossed over your pointing out that the Data Series can be tested in exactly the way I was looking for. I have been plugging away at that all weekend. I still would like to know how I can use the parameters to best optimize.

          I have a chart attached that I would like to share and ask another question. You see at the bottom the Aroon bars are green for Aroon Up and red for Aroon Down. This is to illustrate what I said about the Aroon Down being above 90 for an exit signal. I hope this clarifies that.

          The panel above that I have the MACD line and Bollinger Bands upper and lower. Given that the Bollinger Bands are usually in the same panel as the price bars, is it possible for me to use them together in a strategy? For example I would like to use a MACD crossover of a Bollinger Band for an entry signal. I tried to set this up but the values for the Bollinger Bands appears to come from panel #1 and the MACD line from Panel #2. Your thoughts?
          Click image for larger version

Name:	MACD & Bollinger Bands.png
Views:	38
Size:	322.5 KB
ID:	1116232
          Dolfan
          Attached Files

          Comment


            #35
            Hello Dolfan,

            Thanks for your reply.

            The previously provided example strategy demonstrates how to use user inputs as parameters for the period of the moving averages. When run in the optimizer, you can optimize either or both of the moving averages periods because we used a user input for those.

            The MACD does not produce a MACD line that matches the price data, therefore you cannot create a cross condition between a MACD and a Bollinger when both are based on price data. The example you show was likely created by using "OverLay" scaling for the MACD which will provide a visual reference however if you drag the time scale left or right, you will find that the MACD cross will change because the Bollinger indicator scaling changes. In a strategy, the MACD at a value of 1+ would never cross above a Bollinger line at a price of 1980+.

            It is possible to use the MACD as an input series to the Bollinger which will then put both indicators on the same price scale and this may or may not meet your needs but it can be used in a strategy: https://paul-ninjatrader.tinytake.co...OV8xNDUzNTQ5NA

            Another point of concern is that we do not recommend running strategies in the strategy analyzer (or optimizer) based on Renko bars as these type bars will not show the movement of price that actually occurred while creating the bar and will lead to very misleading results. The strategy analyzer only uses the finished bar which is definitely not what the bar looks like while forming. To test a Renko bar based strategy we advise testing using the Playback with market replay data which will process all of the ticks and will recreate the forming of the bars as they occurred.
            Paul H.NinjaTrader Customer Service

            Comment


              #36
              Thanks Paul. Very helpful indeed. You due for a raise over there?

              Dolfan

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by vibrationketousa, Today, 12:26 AM
              0 responses
              1 view
              0 likes
              Last Post vibrationketousa  
              Started by vibrationketousa, Today, 12:24 AM
              0 responses
              2 views
              0 likes
              Last Post vibrationketousa  
              Started by hdge4u, Yesterday, 09:09 PM
              0 responses
              18 views
              0 likes
              Last Post hdge4u
              by hdge4u
               
              Started by hdge4u, Yesterday, 09:02 PM
              0 responses
              9 views
              0 likes
              Last Post hdge4u
              by hdge4u
               
              Started by stormcloudseven, Yesterday, 08:41 PM
              1 response
              9 views
              0 likes
              Last Post DavidTrades  
              Working...
              X