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 StockTrader88, 03-06-2021, 08:58 AM
        45 responses
        3,992 views
        3 likes
        Last Post johntraderuser2  
        Started by TAJTrades, Today, 09:46 AM
        0 responses
        7 views
        0 likes
        Last Post TAJTrades  
        Started by rhyminkevin, Yesterday, 04:58 PM
        5 responses
        62 views
        0 likes
        Last Post dp8282
        by dp8282
         
        Started by realblubb, Today, 09:28 AM
        0 responses
        8 views
        0 likes
        Last Post realblubb  
        Started by AaronKoRn, Yesterday, 09:49 PM
        1 response
        19 views
        0 likes
        Last Post Rikazkhan007  
        Working...
        X