Ichimoku Trading system – my 1st attempt

Viewing 15 posts - 16 through 30 (of 40 total)
  • Author
    Posts
  • #41886 quote
    Despair
    Blocked
    Master

    When you ran WF tests, which variables did you optimize? Maybe a stupid question but I’m not familiar which all the ichimoku theory.

    #41888 quote
    bmentink
    Participant
    Average

    Hi,

    As mentioned in my post “They all need optimization of the stop level and the slope threshhold. (see comments in code)”

    They are up the top of the code in the variable section,  It is the following

    SlopeThreshold = 2.5 // From back/forward testing optimization
    TGL = 30 // also from back/forward testing, note TGL and TGS the same,

    Cheers

    PS: You will have different values, I was playing with them,

    NOTE: These variables I am optimizing are nothing to do with Ichimoku, just the EMA Slope threshhold and the Stop level.

    #41889 quote
    Despair
    Blocked
    Master

    So only slope and trailing distance, I see. And you run this on 10min chart, correct?

    So far I find promising results for CL (oil) with the version you posted. The Yen pairs don’t give so good results but the version you uploaded is maybe optimized for CL and has to be adapted to the pairs?

    #41890 quote
    bmentink
    Participant
    Average

    The trading system I posted works well on EUR/YEN mini,  10min 10000 units, make sure it has at least 10,000 yen capital to start as there is a bit of drawdown, I get the following with the code.

    I am off to bed, talk tomorrow ..

    Screenshot-from-2017-07-28-21-45-57.png Screenshot-from-2017-07-28-21-45-57.png
    #41893 quote
    Despair
    Blocked
    Master

    There we have the problem. You tested only on 10000 bars which is in 10min bars not much time. See the backtest with 200K bars for EUR/JPY with 1.5 pips spread.

    Anyway for CL the test is fine even with 200K bars. 🙂 I will try to adapt other securities during the weekend. I have not so much time today.

    Ichimoku_10m_EURJPY.png Ichimoku_10m_EURJPY.png
    #41897 quote
    juanj
    Participant
    Master

    @bmentink thank you for posting your very well structured and commented code.

    I think like @despair pointed out it is important to at least make use of the bars you have available when optimizing (i.e. 100k).

    I see you kept to the basics of the Ichimoku strategy. Have you ever looked into Ichimoku Number and wave theory?

    Those are very important factors to consider when trading the Ichimoku strategy. You can find some nice resources on it here:

    https://2ndskiesforex.com/trading-strategies/forex-strategies/ichimoku-price-theory-an-introduction/

    https://2ndskiesforex.com/trading-strategies/forex-strategies/ichimoku-wave-theory-an-introduction/

    https://2ndskiesforex.com/trading-strategies/forex-strategies/ichimoku-number-theory-an-introduction/

    I will have a look at your code in more detail over the weekend.

    I have found in my own time developing Ichimoku that ADX volitility checks and RSI divergence checks also really help sieving out the false signals.

    #41917 quote
    Inertia
    Participant
    Master

    Hi, 3 pts spread for the Oil instrument, 1.5 for the DAX.

    Brut-Leger.png Brut-Leger.png DAX-10.png DAX-10.png
    #41925 quote
    bmentink
    Participant
    Average

    @despair I get your point. (I need to get a faster computer, WF takes forever on my machine testing back that far.)


    @juanj
    Thanks for the kind words. Feel free to add any code that will weed out the false signals if you have time.

    #41928 quote
    bmentink
    Participant
    Average

    @despair I did an WF optimization on CL and got better results with 4.3 for slope and 36 for stoploss, check it out .. also WF efficiency 70%

    Total gain over the period was 1298%

    Screenshot-from-2017-07-29-14-00-36.png Screenshot-from-2017-07-29-14-00-36.png
    #41934 quote
    Despair
    Blocked
    Master

    Very nice! As I said, CL looks promising. I will try to improve the code today and see what i can do.

    #41979 quote
    Despair
    Blocked
    Master

    I spend some time with your code today but the result got worse if you are unwilling (like me) to hold positions over the weekend. All my other changes were minor improvements. I will post if I find an interesting result.

    #42010 quote
    juanj
    Participant
    Master

    @bmentink you can add the following addition to your code to your CL result;

    // ------------------------------- Additional Criteria -----------------------------------
    
    R = RSI[15](close) //RSI Period to determine momentum
    
    If R > R[22] Then
    If close < close[22] Then
    BDIV = 1 //Possible Bearish Divergence Present
    SDIV = 0
    EndIf
    EndIf
     
    If R < R[22] Then
    If close > close[22] Then
    SDIV = 1 //Possible Bullish Divergence Present
    BDIV = 0
    EndIf
    EndIf
    
    AX = ADX[12] > 11
    // ---------------------------------- Market Stuff --------------------------------------
    
    if BOK=-1 and BDIV = 0 and AX then
    sellshort NbrContracts contract at market
    endif
    
    if BOK=1 and SDIV = 0 and AX then
    buy NbrContracts  contract at market
    endif

    Also be aware that according to my knowledge Senkou-Span A and B should be formulated as:

    SSpanA = (tenkansen+kijunsen)/2
    SSpanB = (highest[52](high)+lowest[52](low))/2

    Reason being that they are projected 26 periods ahead. By calculating them as you did (26 periods back) you discount a big part of the system.

    SSpanA and SSpanB have 3 components to them if calculated as mentioned above.

    1. The leading edge (26 periods ahead) – SSpanA > SSpanB = Bullish and SSpanA < SSpanB = Bearish
    2. The current cloud (26 periods back from leading edge of cloud) – used to determine Kumo break.
    3. The trailing cloud (5 2 periods back from leading edge of cloud)  – used to determine resistance (current close/chikou must be clear of the trailing cloud.
    Despair thanked this post
    #42031 quote
    bmentink
    Participant
    Average

    @juanj Many thanks for that. A couple of questions:

    1. Did you actually try my system with those modifications?
    2. Regarding the RSI and ADX parameters, did you optimize those to get to those values? If not, where did the numbers come from?
    3. Regarding SSpanA and B formula, I got those off the Forum, so maybe they are incorrect, I don’t know.

    Anyway, I will try those mods out when I get home. Thanks again.

    #42033 quote
    juanj
    Participant
    Master

    @bmentink

    1. Yes, it improved both the win rate and drawdown
    2. It was optimized for CL although generally you want ADX to be above 10
    3. The way you got it is not incorrect, it simply discounts the leading edge of the cloud
    #42045 quote
    bmentink
    Participant
    Average

    @juanj

    I tried your additions to the code, but although the drawdown did decrease, the reduction of %profit was well down on what it was originally. I have attached output of latest. (the original profit was in the order of 39% on CL ..)

    It would have been better if you had posted your code version and output of your testing, so we are on the same page.

    EDIT: And adding the changes to SSpanA/B that you suggested, dropped %profit down further to 2%

    Cheers,

    Screenshot-from-2017-07-31-15-29-35.png Screenshot-from-2017-07-31-15-29-35.png
Viewing 15 posts - 16 through 30 (of 40 total)
  • You must be logged in to reply to this topic.

Ichimoku Trading system – my 1st attempt


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
bmentink @bmentink Participant
Summary

This topic contains 39 replies,
has 7 voices, and was last updated by juanj
8 years, 7 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/24/2017
Status: Active
Attachments: 12 files
Logo Logo
Loading...