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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        144 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        71 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X