Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Hold Order Value Constant?

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

    #16
    Thanks Bertrand,
    You're GREAT!! I learn best from examples that are correct. I've been stuck outside most all day but can hopefully dedicate tonight to playing with the strats!!
    Joe

    Comment


      #17
      Hey Bertrand,
      Everything is working beautifully! This will open up new doors when testing an idea with a strategy. What I really like is that none of the conditions are over-ridden when a SL and PT is set (so far). With that said, I think I'm about to run into that problem when I add an exit condition on top of the SL condition. I'll post a new thread for help with that one if I find that to be the case. Also, when I'm done, I'll post the final strategy which will hold the entry point constant unless filled or cancelled, plus have a break-even stop, plus have a "stop trading" after a specific realized profit or loss so folks can have all three examples in one strategy. That one line of tradeprice > 0 in the entry condition was the magic key.
      Thanks for preservering with me!!
      Joe

      Comment


        #18
        You are welcome Joe, great to hear it works for you! Let me know additional questions you may have!

        Originally posted by Trade1953 View Post
        Hey Bertrand,
        Everything is working beautifully! This will open up new doors when testing an idea with a strategy. What I really like is that none of the conditions are over-ridden when a SL and PT is set (so far). With that said, I think I'm about to run into that problem when I add an exit condition on top of the SL condition. I'll post a new thread for help with that one if I find that to be the case. Also, when I'm done, I'll post the final strategy which will hold the entry point constant unless filled or cancelled, plus have a break-even stop, plus have a "stop trading" after a specific realized profit or loss so folks can have all three examples in one strategy. That one line of tradeprice > 0 in the entry condition was the magic key.
        Thanks for preservering with me!!
        Joe

        Comment


          #19
          Hello Bertrand,
          I am progressing from Indicator builder to strategy builder and I am having the same problems as "Trade 1953". It looks like I have gone through the same process of trying existing sample strategies that NT staff have posted, but I am still having problems.

          I have downloaded your TradePrice3, but it does not work. The error log finishes by saying "Please fix your strategy".

          I note that the code has a gap between "Condition Set 3 and Condition Set 9.
          It would be much appreciated if you could have a look at the code and, if possible, fix it.

          Thank you from Oldhiker.

          Comment


            #20
            oldhiker, on which instrument and timeframe do you run the demo script? The gap you see in the conditions is ok.

            Comment


              #21
              Hello Bertrand,
              I was backtesting on the AUS/USD on a 15 M timeframe.

              Before I posted this reply, I decided to rechech the strategy, and
              now it works.

              I do not know the reason why it did not work the yesterday when I tried it.
              Thank you for your reply and the sample code. I shall now study it to see how I can translate the code to suit my requirements.

              I have just looked at the Output Window and it is full of messages. This is another idea that I have learned, by using "TraceOrders = true;" I have been generating some messages from within my strategy, and that is the reason for having it open when retesting your TradePrice3 strategy.

              This forum is very helpful for code learning.

              Comment


                #22
                Thanks for letting me know oldhiker and glad to hear you enjoy working with our forums - for the TraceOrders feature be sure to check into this tip here - http://www.ninjatrader.com/support/f...ead.php?t=3627

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                672 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                379 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                111 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                576 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                582 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X