Ichimoku Chikou Cross

Discussion in 'MetaTrader Expert Advisors' started by Enivid, Jun 4, 2013.

  1. Enivid

    Enivid Administrator Staff Member

    8,771
    310
    114
    Discuss Ichimoku Chikou Cross expert advisor here. It is a long-term EA based on the standard Ichimoku Kinko Hyo indicator with arbitrary ATR-based position sizing. You can ask any questions about this expert advisor here.
     
    Last edited: Sep 5, 2017
    new digital likes this.
  2. hugo

    hugo Trader

    26
    0
    12
    Very interessting!
    Will the EA only close trades after the end of a bar?
     
  3. Enivid

    Enivid Administrator Staff Member

    8,771
    310
    114
    Yes, it trades on new bar opening only.
     
  4. hugo

    hugo Trader

    26
    0
    12
    Thank you for your fast answer!
    I think it is better to use an emergency SL for the time between the bars. Is it possible to add this in the code?
     
  5. Enivid

    Enivid Administrator Staff Member

    8,771
    310
    114
    I believe it goes against the strategy to apply hard SL in this EA. If you really want it, you can use it along with some stop-loss setting EA, e.g. this one.
     
  6. hugo

    hugo Trader

    26
    0
    12
    Hello,

    I have a question about the Money Managment of this EA. Do it use the relation between the account currency and the pip currency of the traded pair for the calculation of the lot size?

    Have a nice week!

    hugo
     
  7. Enivid

    Enivid Administrator Staff Member

    8,771
    310
    114
    Yes, it does.
     
  8. hugo

    hugo Trader

    26
    0
    12
    Thank you for your answer, Enivid!
    I try to build an own EA with this possibility. Do you know another code example for this calculation?

    Thanks and greetings
    hugo
     
  9. Enivid

    Enivid Administrator Staff Member

    8,771
    310
    114
  10. hugo

    hugo Trader

    26
    0
    12
    Great!
    Thank you for your advice, Enivid!
     
    Last edited: Jan 16, 2014
  11. Baribal

    Baribal Trader

    1
    0
    12
    Some problems with installation

    I know simple quastions should be avoided on this forum however I want to ask for help in Ichimoku cross EA setting - up (I am using Build 646 version 4). The problem is that I can see it in MQL4/Experts folder (Ichimoku-Chinkou-Cross.ex4) and simultanoulsly it is invisible in Navigator panel in Experts folder. When I double click it in MQL4/Experts folder MetaQuotes Editor is not getting started. When I open it manually (F4) a file with Ichimoku-Chinkou-Cross is not visible, Therefor I can not compile it. Can you hep me with this?
    I am rrally happy to work with this indicator. I have been using Ichimoku for 2 years and EA would be a big help for me. However I will believe in manualy set targets.
    Baribal
     
  12. Enivid

    Enivid Administrator Staff Member

    8,771
    310
    114
    You cannot compile .ex4 file. .ex4 is already compiled. You need .mq4 to open it with editor and compile if you want.
     
  13. zer0

    zer0 Newbie

    1
    0
    2
    can help me on this?

    Code (MQL4):
    void ClosePrevious()
    {
       int total = OrdersTotal();
       for (int i = 0; i < total; i++)
       {
          if (OrderSelect(i, SELECT_BY_POS) == false) continue;
          if ((OrderSymbol() == Symbol()) && (OrderMagicNumber() == Magic))
          {
             if (OrderType() == OP_BUY)
             {
                RefreshRates();
                OrderClose(OrderTicket(), OrderLots(), Bid, Slippage);
             }
             else if (OrderType() == OP_SELL)
             {
                RefreshRates();
                OrderClose(OrderTicket(), OrderLots(), Ask, Slippage);
             }
          }
    got error in this section..
     
    Last edited by a moderator: Sep 28, 2015
  14. Enivid

    Enivid Administrator Staff Member

    8,771
    310
    114
    An error or a warning? Warnings are OK there.
     
  15. Devimt

    Devimt Newbie

    4
    0
    1
    Hi

    Very nice EA with im looking an EA for Chikou cross so that why I'm here

    Im looking to your code and have a plan to set other CLose trade. How do I do that istead of using chikou cross against as this curren EA?

    Thank you

    Hopefully help with hands will make this better EA
     
  16. Enivid

    Enivid Administrator Staff Member

    8,771
    310
    114
    What kind of close do you want to use?
     
  17. Devimt

    Devimt Newbie

    4
    0
    1
    hi

    Im trying and do you think it work

    Close when SMA 1 cross SMA 3, close buy when SMA 1 cross SMA 3 from the top down and reverse
     
  18. Enivid

    Enivid Administrator Staff Member

    8,771
    310
    114
    I think it will impair the EA's performance. Currently, the average length of the winning trade is about 40 bars. If you add such a sensitive close signal as SMA1/SMA3 cross, it will significantly shorten the lifetime of winning trades, decreasing their profitability.

    But you are free to try. Please let us know the backtest results.
     
  19. Devimt

    Devimt Newbie

    4
    0
    1
    Because I see some trade was in profit and turn to loss.

    If I add it

    How would I do?

    Could you advise? Which line of code should I add to or something because I tried but I doesnt work

    Thank you
     
  20. Enivid

    Enivid Administrator Staff Member

    8,771
    310
    114
    You would have to add quite a lot of lines of code to do that. If you want to do that yourself you would need to do the following:
    1. Add a handle for each EMA.
    2. At each bar, copy the values of the EMAs.
    3. Check if they cross.
    4. Close long if it exists and there is a bearish cross.
    5. Close short if it exists and there is a bullish cross.

    If you do not want to do it yourself, you would need to hire some coder.
     
    new digital likes this.

Share This Page