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

        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

            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 aa731, Today, 02:54 AM
                0 responses
                4 views
                0 likes
                Last Post aa731
                by aa731
                 
                Started by thanajo, 05-04-2021, 02:11 AM
                3 responses
                470 views
                0 likes
                Last Post tradingnasdaqprueba  
                Started by Christopher_R, Today, 12:29 AM
                0 responses
                10 views
                0 likes
                Last Post Christopher_R  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                166 responses
                2,237 views
                0 likes
                Last Post sidlercom80  
                Started by thread, Yesterday, 11:58 PM
                0 responses
                4 views
                0 likes
                Last Post thread
                by thread
                 
                Working...
                X