Announcement

Collapse
No announcement yet.

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:	142
Size:	17.5 KB
ID:	1268720Click image for larger version

Name:	Screenshot (4).png
Views:	121
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 NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          56 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          132 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          73 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          49 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X