• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Beginner Advice Needed

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

    #31
    Originally posted by pswarts View Post
    The strategy as discussed above when backtesting , give me frequent Exit on Close orders with (to me ) random distances from the entry orders at times, at other times the orders execute properly ,but I have no ExitLong or any other Exit for that matter in my code at all. Please advise on what the problem may be. Tnx

    On the attached image the 2nd stoploss was at low of last three bars which is correct, the first order with an ExitOnClose makes no sense. I can attach more images if you need to demonstrate
    I believe that ExitOnClose = true; is the default. If you do not have any ExitOnClose statement, then you will be closed at exit.

    Comment


      #32
      How do I set my stoploss to be (x)ticks below the lowest low of last three bars,when I make the changes as shown it does not work
      SetStopLoss(
      "Entry3", CalculationMode.Price, MIN(Low, 3)[0], true);
      changed to
      SetStopLoss("Entry3", CalculationMode.Price, MIN(Low, 3)[0]-20, true);
      I presume it has to do with Price vs Ticks but does not know how to fix it

      Oh think I found it: is this the correct way?:
      SetStopLoss("Entry3", CalculationMode.Price, MIN(Low, 3)[0]-20 * TickSize, true);
      Last edited by pswarts; 12-13-2011, 03:14 AM.

      Comment


        #33
        PSwarts,

        Yes that should do the trick. If you run into further problem please let me know what output you are getting that is not expected so we know where to isolate.

        -Brett
        BrettNinjaTrader Product Management

        Comment


          #34
          Now a paid Ninja customer whooohooo, quick question, when I do Market Replay and enter treades even while I stay connected to market replay when I pick the Replay account and the instrument I traded on it does not generate anything, keep showing just 0.00's , no report. Please advise how I can fix this

          Comment


            #35
            Hello,

            What instrument are you trading on and if you switch to the points mode for the account performance report by selected it in the drop down menu to the right of the generate button does it show now?

            If not toggle between the orders tab and the account performance tab to refresh it and try generate again.

            -Brett
            BrettNinjaTrader Product Management

            Comment


              #36
              A little off topic here. But how do I write a Stoploss with an if statement. meaning i only want it to trigger or be true "if" a condition is met?
              does it matter where in the code i insert the code for a stoploss

              Comment


                #37
                Hello hifreq,

                You can use SetStopLoss at any time including in an if statement.

                Once the stop loss has been set with SetStopLoss, you will not be able to remove the stop loss, however, you can modify the price at which it is sitting.

                If you are only wanting to exit the trade when particular conditions are true (and not after the conditions were true but no longer are), it may be better to an exit order.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NinjaCustomer, Today, 01:01 AM
                0 responses
                3 views
                0 likes
                Last Post NinjaCustomer  
                Started by mohdqallaf, Today, 12:55 AM
                0 responses
                3 views
                0 likes
                Last Post mohdqallaf  
                Started by dvcpro4, Yesterday, 07:08 PM
                2 responses
                25 views
                0 likes
                Last Post NT-Roland  
                Started by chrismcdermut, Yesterday, 01:46 PM
                3 responses
                19 views
                0 likes
                Last Post MojoJojo  
                Started by Bricolico, Yesterday, 09:28 PM
                0 responses
                5 views
                0 likes
                Last Post Bricolico  
                Working...
                X