USDJPY – Easy target

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #51580 quote
    Ricx
    Participant
    Junior

    I tried to create a simple strategy with an easy target, just to get started with automated trading as I am fairly new to this type of trading.
    It is a very simple strategy, which might be something to add a few tweaks to.

    However I would like to minimize the number of trades ending up even, anyone got any ideas of how to accomplish that?

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Prevents the system from placing new orders on specified days of the week
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    // Conditions to enter long positions
    indicator1 = RSI[2](close)
    c1 = (indicator1 CROSSES OVER 8)
    
    IF c1 AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    indicator2 = RSI[2](close)
    c2 = (indicator2 > 20)
    
    IF c2 THEN
    SELL AT MARKET
    ENDIF
    
    // Conditions to enter short positions
    indicator3 = RSI[2](close)
    c3 = (indicator3 CROSSES UNDER 83)
    
    IF c3 AND not daysForbiddenEntry THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions to exit short positions
    indicator4 = RSI[2](close)
    c4 = (indicator4 < 77)
    
    IF c4 THEN
    EXITSHORT AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP pLOSS a
    skarmavbild-kl-150990931784lcp.png skarmavbild-kl-150990931784lcp.png
    #51630 quote
    jebus89
    Participant
    Master

    The amount of even trades youre getting is definitly a red flag.. another thing is most people who runs a similiar 10/2 rsi or in ur case 20/2 rsi, they pretty much always seem to add the “close > 200MA” rule. or something similar to define uptrend vs downtrending market.

     

    What is your stop loss? It seems way way way too tight

    #51855 quote
    Ricx
    Participant
    Junior

    You’re right, something seems odd. Though I cannot really seem to figure out what..?

    What does 10/2 and 20/2 means when it comes to RSI?

    Oh, I must have forgotten to delete the parameter for testing the best outcome from SL point of view. I used 27 as SL as it gave the best results in backtesting.

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

USDJPY – Easy target


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Ricx @ricx Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Ricx
8 years, 4 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/06/2017
Status: Active
Attachments: 1 files
Logo Logo
Loading...