Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy performing differently in live mode and backtest mode

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

    Strategy performing differently in live mode and backtest mode

    I have written a strategy that calculates the number of contracts to be traded, depending on the result of the last trade. For the very first trade, it sets the number of contracts to be traded to the value of a user input parameter - InitialQuantity.

    The strategy works fine in backtest mode, but when I run it in live mode, it does not read the value from InitialQuantity, but always starts with 1 contract, and I cannot understand why. Perhaps I am misunderstanding the values that Performance.AllTrades and Performance.RealtimeTrades return.

    I have attached the code and would be gratefuul for any suggestions.
    Thanks.
    Attached Files
    Last edited by annettes; 08-24-2011, 05:03 AM. Reason: spelling errors

    #2
    annettes, are you sure the value does not get reset as you calc the needed contracts fresh on realtime data seen and thus a new trade collection to be used? Perhaps you would need to work in an intSeries for the contact sizes used, so you could refer to the last known intSeries qty before transitioning to realtime trading with it.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sjsj2732, Yesterday, 04:31 AM
    0 responses
    31 views
    0 likes
    Last Post sjsj2732  
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    286 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    283 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    133 views
    1 like
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    91 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Working...
    X