Cumulate orders working in backtest but not live trading

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #45026 quote
    John Ren
    Participant
    New

    I’ll copy and paste my code just in case I have something wrong here.. But I can’t work out what the problem is.

    I watch the backtest window work side-by-side the real window and they behave differently with the same code. The backtest opens cumulative orders but the live version does not… 🙁

     

    DEFPARAM CumulateOrders = true //

    // Conditions to enter long positions
    indicator1 = MACD[12,26,9](close)
    c1 = (indicator1 CROSSES OVER -1)

    IF c1 THEN
    BUY 1 PERPOINT AT MARKET
    ENDIF

     

    // Conditions to enter short positions
    indicator3 = MACD[12,26,9](close)
    c3 = (indicator3 CROSSES UNDER 1)

    IF c3 THEN
    SELLSHORT 1 PERPOINT AT MARKET
    ENDIF

     

    // Stops and targets
    SET STOP pLOSS 20
    SET TARGET pPROFIT 25

    #45027 quote
    John Ren
    Participant
    New

    Just realized I posted this in the wrong section. Sorry.. hopefully it can be moved 🙁

    #45029 quote
    dreif123
    Participant
    Average

    spreads are the same ?

    John Ren thanked this post
    #45030 quote
    JC_Bywan
    Moderator
    Master
    Hi, Yes don’t worry, I’ll move your post from ProScreener forum to ProOrder forum

    Please update your country flag by selecting a location in your profile settings. Thank you.

    Please use the “<>” (insert PRT code) button in the message editor toolbar when adding code to a message. Thank you.
    John Ren thanked this post
    #45033 quote
    Despair
    Blocked
    Master
    Just a mistake I made before that caused a similar problem. When you start your strategy live you must enter how many contracts the strategy is allowed to open. If this is for example is set to 1 your strategy will only open 1 contract and not cumulate even if you have activated it in your code.
    John Ren thanked this post
    #45037 quote
    John Ren
    Participant
    New
    Just a mistake I made before that caused a similar problem. When you start your strategy live you must enter how many contracts the strategy is allowed to open. If this is for example is set to 1 your strategy will only open 1 contract and not cumulate even if you have activated it in your code.
    This must be it! Thanks a lot.
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Cumulate orders working in backtest but not live trading


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
John Ren @john_ren Participant
Summary

This topic contains 5 replies,
has 4 voices, and was last updated by John Ren
8 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/31/2017
Status: Active
Attachments: No files
Logo Logo
Loading...