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

Deleted Indicator from Strategy

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

    Deleted Indicator from Strategy

    Hello New Here,
    I'm getting one error in the compiler "Type or namespace definition, or end-of-file expected"
    The strategy was originally done on the Strategy Builder (with the indicator) then I moved it to MS Visual Studio (so I could work over the weekend) when I deleted the indicator. Now when I reload it I'm getting this error.
    In (State == State.DataLoaded) the indicator is referenced there so I was assuming I could get away with deleting the indicator.

    Please help the n00bie. Only one bug left.

    #2
    Hello Fbraun378,

    This sounds like a syntax error.

    May I confirm every opening curly brace has a matching closing curly brace? Does every closing curly brace have a matching opening curly brace?

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      That's exactly what I thought also. I checked it over and it looks good. I will try it again tomorrow, maybe my eyes are tired.

      My actual trouble is that I am trying to add an ATM strategy to a strategy that doesn't have multiple orders/trailstops. Is it possible it get a sample code for the ATM strategy that I attached as a picture? I can't seem to find the correct verbiage. (Three Orders, Stoploss, Profit, Breakeven, and double trailstop.) It seems simple enough when I use the manual entries

      Click image for larger version

Name:	Screenshot (3).png
Views:	92
Size:	17.5 KB
ID:	1268720Click image for larger version

Name:	Screenshot (4).png
Views:	72
Size:	27.2 KB
ID:	1268721

      Comment


        #4
        Hello Fbraun378,

        If you want to use Atm templates you would need to unlock the script and use advanced Atm Strategy methods.

        Included with NinjaTrader is the SampleATMStrategy which has example code.

        Below are links to the help guide.




        If you want to use logic to submit multiple entry orders, set the EntryHandling to UniqueEntries and give each entry a unique signalName.

        Below is a link to an example.

        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thank You Chelsea.
          I found out the error, it wasn't "end-of-file-expected" it was a public class error because I left a few lines of the old string in it so the compiler was searching the properties {set, get} for definitions.
          Amazing what giving ourselves a little rest break can accomplish. Ty

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Ashkam, 04-29-2024, 09:28 AM
          4 responses
          43 views
          0 likes
          Last Post Ashkam
          by Ashkam
           
          Started by nightstalker, Yesterday, 02:05 PM
          1 response
          29 views
          0 likes
          Last Post NinjaTrader_Eduardo  
          Started by dcriador, Today, 02:09 PM
          0 responses
          7 views
          0 likes
          Last Post dcriador  
          Started by nicthe, Today, 07:38 AM
          4 responses
          22 views
          0 likes
          Last Post bltdavid  
          Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
          30 responses
          98 views
          0 likes
          Last Post cmtjoancolmenero  
          Working...
          X