Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ETD for backtesting

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

    ETD for backtesting

    Is there anyway to calculate the amount of time or bars it took for a trade to reach the MFE? With that info was thinking I could calculate for all trades the average time/bars it took to reach MFE and the average MFE amount and set an exit condition to have it cutoff trades that haven't reached the average MFE amount by the average time/bars.
    Last edited by zachj; 02-12-2014, 08:32 PM.

    #2
    Hello Zachj,

    I have attached a sample script that should get you started and on the right path.
    Attached Files
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Is there a time component somewhere in there, is that what wait is? Is wait == 5, is that 5 seconds?

      Comment


        #4
        Zachj,

        Yes and no, you can use it for COBC set to true in which that part of the script will wait for 5 bars.
        If set to false then it will wait 5 ticks
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        61 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        39 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        21 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        23 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        51 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X