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 rhyminkevin, Today, 04:58 PM
              3 responses
              47 views
              0 likes
              Last Post Anfedport  
              Started by iceman2018, Today, 05:07 PM
              0 responses
              5 views
              0 likes
              Last Post iceman2018  
              Started by lightsun47, Today, 03:51 PM
              0 responses
              7 views
              0 likes
              Last Post lightsun47  
              Started by 00nevest, Today, 02:27 PM
              1 response
              14 views
              0 likes
              Last Post 00nevest  
              Started by futtrader, 04-21-2024, 01:50 AM
              4 responses
              50 views
              0 likes
              Last Post futtrader  
              Working...
              X