Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy disables automatically

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

    Strategy disables automatically

    Hi,
    I'm using a very simple strategy I created that marks bars which close below an EMA.
    The issue I'm having is that the strategy frequently becomes disabled after I've made a trade using Chart Trader, resulting in my having to manually re-enable it many times per session.
    Here is the strategy and a related clip from my log.
    Any suggestions would be appreciated.
    Thanks.



    Click image for larger version

Name:	log.png
Views:	80
Size:	9.4 KB
ID:	1285068



    #2
    Hello manraygun,

    That would be expected if you close a position using the chart trader. In general its not supported to manually trade the same instrument that your strategy is running on. The strategy is intended to work in your place instead of you manually trading. For a strategy to not be disabled and also have the ability to manually trade you would need to make a more advanced strategy that adds custom buttons to the chart so you can have the strategy submit orders rather than the chart trader.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks. Is there an easy way to turn this into an indicator? Set 1 is just the opposite and a different barbrush color.

      Click image for larger version

Name:	strat.png
Views:	67
Size:	23.8 KB
ID:	1285277

      Comment


        #4
        Hello manraygun,

        You can use the View Code features to view the C# code that was generated. Indicators are manually coded so you would need to reference the code for your condition and then put that code in the same locations in the indicators code. You can create new indicators using the NinjaScript editor.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Thanks. Would the NinjaScript Wizard be useful here?

          Comment


            #6
            Hello manraygun,

            The new indicator wizard can be used to generate the basics for an indicator like plots or user inputs but that is mainly just for creating a new indicator, it does not have a condition builder like the strategy builder. Once you make a new indicator you can use the strategy builder to make conditions and then click view code so you can see what code was made and then replicate that in the indicator.
            JesseNinjaTrader Customer Service

            Comment


              #7
              I see. Thank you.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Segwin, 05-07-2018, 02:15 PM
              14 responses
              1,789 views
              0 likes
              Last Post aligator  
              Started by Jimmyk, 01-26-2018, 05:19 AM
              6 responses
              837 views
              0 likes
              Last Post emuns
              by emuns
               
              Started by jxs_xrj, 01-12-2020, 09:49 AM
              6 responses
              3,293 views
              1 like
              Last Post jgualdronc  
              Started by Touch-Ups, Today, 10:36 AM
              0 responses
              13 views
              0 likes
              Last Post Touch-Ups  
              Started by geddyisodin, 04-25-2024, 05:20 AM
              11 responses
              63 views
              0 likes
              Last Post halgo_boulder  
              Working...
              X