EURGBP and EURUSD strategy 5mins

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #132326 quote
    jays1
    Participant
    New

    Strategy seems to work well on EURGBP and EURUSD 5 mins. Haven’t tested it on other markets.

    Any suggestions to improve the strategy would be appreciated.

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    //20 bar restriction saying a new trade cant be entered into until x bars have passed since a long or short position was exited. The no of bars is defined as the number in the quote "BarCount > ____".
    ONCE BarCount = 0
    ONCE TradeON  = 1           //1=trading allowed     0=trading disbaled
    IF LongOnMarket OR ShortOnMarket AND Not LongOnMarket[1] AND Not ShortOnMarket[1] THEN
    TradeON  = 0             //disable trading
    BarCount = 0             //reset counter
    ENDIF
    IF Not LongOnMarket And Not ShortOnMarket THEN    //Increase counter when not on market
    BarCount = BarCount + 1
    ENDIF
    IF BarCount > 1 THEN
    TradeON = 1
    ENDIF
    
    // Conditions to enter long positions
    c1 = (open > close)
    
    IF c1 AND TradeON THEN
    BUY 1 SHARES AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    c2 = (open < close)
    
    IF c2 THEN
    SELL AT MARKET
    ENDIF
    
    // Conditions to enter short positions
    c3 = (open < close)
    
    IF c3 AND TradeOn THEN
    SELLSHORT 1 SHARES AT MARKET
    ENDIF
    
    // Conditions to exit short positions
    c4 = (open > close)
    
    IF c4 THEN
    EXITSHORT AT MARKET
    ENDIF

     

    equitycurve-1590013916lp8c4.png equitycurve-1590013916lp8c4.png
    #132830 quote
    Nicolas
    Keymaster
    Master

    Thanks, but I think you forgot to add the spread  fee during your backtests.

    Nole djole thanked this post
    #132836 quote
    Nole djole
    Participant
    New

    Hi, Nicolas can you help solve a problem.Thank you i love your work§

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

EURGBP and EURUSD strategy 5mins


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
jays1 @jays1 Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by Nole djole
5 years, 9 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/22/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...