Thread: Help with strategy script

  1. #1
    Registered User
    Join Date
    Dec 2011

    Help with strategy script

    Hi everyone,

    I have been trying to compile a trading strategy but i keep getting a single error CS1513.

    I cant find the problem and its driving me mad. I am not a programmer so its very hard for me to fix.

    Can someone please point out my mistake and how I can fix it.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    Dec 2011
    If anyone knows of any training material on C# please let me know.


  3. #3
    Gawking at stupidity
    Join Date
    Jul 2004
    Oregon, USA
    Looks like you're missing a closing brace for the OnPositionClosed() method.
    	public override void OnPositionClosed()
    		// when a position is closed, cancel the limit and stop
    		// orders that might be associated with this position.
    		// But only cancel if the order has not been filled or
    		// not been cancelled already.
    		if (OCAExitEnabled &&
    			!(limitOrder.IsFilled || limitOrder.IsCancelled))
    		// allow entries once again, since our position is closed
    		entryEnabled = true;
    	} // <-- Right here
    	public override void OnStopExecuted(Stop stop)
    If you search online you'll find a hundred tutorials on learning C#.
    If you understand what you're doing, you're not learning anything.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 15
    Last Post: 06-16-2011, 05:17 AM
  2. Afehganistan strategy
    By Mario F. in forum General Discussions
    Replies: 47
    Last Post: 10-31-2009, 11:34 PM
  3. Replies: 0
    Last Post: 02-05-2009, 06:59 PM
  4. Please review my learning strategy
    By Chewbacca in forum C++ Programming
    Replies: 16
    Last Post: 08-19-2002, 10:54 AM
  5. Football simulation strategy
    By real_cozzy in forum Game Programming
    Replies: 0
    Last Post: 08-14-2001, 04:29 PM