Page 4 of 9 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 87
  96 96 Attachment(s)    

Thread: Stochastic Divergence Trader

  1. #31

    Default

    idea ea is simple, on the picture.
    critical moment is close position, it's something bad, I don't now. Moment for close ,sometimes closed almost second after open.

    now, i'm testing condition : usuhmaforopen/true and results are pretty good, even more safe then without it(should be ).
    Attached Images Attached Images Stochastic Divergence Trader-cross-stoch-divergence-gif 
    Attached Files Attached Files

  2. #32

    Default

    hma out
    i try to do only stoch cross version
    there are results with cross stoch and without.

    Really, i don't undestand if my condition are good or no ?
    please help
    //condition close buy
    if((SV>0)||(UseSFCwithClose&&SC2<SC1&&SCA<SCB&&OB> 0)||(TIFI=="true")||(UseSFCwithClose==false&&(Enab leRealSL&&(OrderOpenPrice()-Bid)/Point>=RealSL))||(UseSFCwithClose==false&&(EnableR ealTP&&(Ask-OrderOpenPrice())/Point>=RealTP))){CB=1;}

    so . it,s mean that if only one of this conditions is true - CB=1 ?
    I want do condition to close buy/seel after cross, it's typical , but i'm not sure that is correct
    Attached Images Attached Images Stochastic Divergence Trader-gbpusd-4h-stoch-close-gif Stochastic Divergence Trader-gbpusd-4h-stoch-false-gif 
    Attached Files Attached Files

  3. #33

    Default

    here it is ea
    Attached Files Attached Files

  4. #34
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    The red part is not needed :

    if((SV>0)||(UseSFCwithClose&&SC2<SC1&&SCA<SCB&&OB>0)||(TIFI=="true")||(UseSFCwithClose==false&&(EnableRealSL&&(OrderOpenPrice()-Bid)/Point>=RealSL))||(UseSFCwithClose==false&&(EnableRealTP&&(Ask-OrderOpenPrice())/Point>=RealTP))){CB=1;}

    if((BV>0)||(UseSFCwithClose&&SC2>SC1&&SCA>SCB&&OS>0)||(TIFI=="true")||(UseSFCwithClose==false&&(EnableRealSL&&(Ask-OrderOpenPrice())/Point>=RealSL))||(UseSFCwithClose==false&&(EnableRealTP&&(OrderOpenPrice()-Bid)/Point>=RealTP))){CS=1;}

  5. #35

    Default

    Quote Originally Posted by funyoo View Post
    The red part is not needed :
    I did , as you wrote
    results usestochwithclose=false is the same
    but usestochwithclose=true completly different
    Attached Images Attached Images Stochastic Divergence Trader-gbpusd-4h-stoch-close-after-change-gif 
    Attached Files Attached Files

  6. #36

    Default

    after some changes and optimisation
    open trade with one of two filters : MA or Hma
    close trade by :
    -SL,TP
    -oposite new signal
    -close by stoch
    Attached Images Attached Images Stochastic Divergence Trader-uj-4h-risk7-gif 
    Attached Files Attached Files

  7. #37

    Default

    Hello Mr.Funnyo
    Would you be so kind to help with this problem.
    I,m trying to do use indicator cci divergence in the ea, but i can't to make good condition in the ea


    double STD1=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,0,MODE_SMA,0,i);
    double STD2=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,0,MODE_SMA,1,i);
    double STD3=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,0,MODE_SMA,2,i);
    double STD4=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,0,MODE_SMA,3,i);
    double STD5=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,0,MODE_SMA,0,i+1);
    double STD6=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,0,MODE_SMA,1,i+1);
    double STD7=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,0,MODE_SMA,2,i+1);
    double STD8=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,0,MODE_SMA,3,i+1);
    double STD9=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,0,MODE_SMA,4,i+1);
    double STD10=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,0,MODE_SMA,6,i+1);

    string SBUY="false";string SSEL="false";
    if((STD10)<EMPTY_VALUE&&STD6<0)SBUY="true";
    if((STD10)<EMPTY_VALUE&&STD5>0)SSEL="true";

    it is not correct. i try different ,but nothing. As i suppose it probably simple but not for me
    Please help,as you have time and possibility
    Attached Images Attached Images Stochastic Divergence Trader-strategytester-cci-divergence-test-gif 
    Attached Files Attached Files

  8. #38
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Hi przem81621,

    I'm not sure of what you want to do, if you want to trade at signals, confirmed by HMA, try this :
    Code:
    double STD1=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,0,i);
    double STD2=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,1,i);
    double STD3=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,2,i);
    double STD4=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,3,i);
    
    string SBUY="false";string SSEL="false";
    if(STD3>0 && STD3!=EMPTY_VALUE)SBUY="true";
    if(STD4<0 && STD4!=EMPTY_VALUE)SSEL="true";

  9. #39

    Default

    Quote Originally Posted by funyoo View Post
    Hi przem81621,

    I'm not sure of what you want to do, if you want to trade at signals, confirmed by HMA, try this :
    Code:
    double STD1=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,0,i);
    double STD2=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,1,i);
    double STD3=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,2,i);
    double STD4=iCustom(Symbol(),0,"CCI_Divergence_v1 moj",CCI_Period,3,i);
    
    string SBUY="false";string SSEL="false";
    if(STD3>0 && STD3!=EMPTY_VALUE)SBUY="true";
    if(STD4<0 && STD4!=EMPTY_VALUE)SSEL="true";
    thanks for answer
    sorry, but that is no good.i'm tried this
    I want open sell/buy as indicator signal appear, it's all.

  10. #40
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by przem81621 View Post
    thanks for answer
    sorry, but that is no good.i'm tried this
    I want open sell/buy as indicator signal appear, it's all.
    You have to try it in demo, as the signals are not drawn in backtesting. If it doesn't work, then you have to see what are the results when you put STD3/STD4 >0, <0, !=0, ==0, >EMPTY_VALUE, <EMPTY_VALUE, !=EMPTY_VALUE, ==EMPTY_VALUE. Sometimes, when the usual logics doesn't work, you have to try these combinations.

Similar Threads

  1. Divergence EA
    By przem81621 in forum Ideas for expert advisors
    Replies: 8
    Last Post: 02-04-2014, 15:12
  2. RSI Divergence Trader
    By funyoo in forum Expert advisors backtesting
    Replies: 2
    Last Post: 08-13-2011, 22:34
  3. Stochastic Ea
    By Cyrillic in forum Ideas for expert advisors
    Replies: 3
    Last Post: 04-24-2010, 21:16
  4. CCI Divergence EA
    By roodstaart in forum Ideas for expert advisors
    Replies: 0
    Last Post: 03-25-2010, 08:23

Tags for this Thread

100, advisor, alpari, alpari uk, backtest, backtesting, change, coding, color, demo, divergence, eas, eurjpy, ex4, expert, expert advisor, expert advisors, experts, forex, free, fx5, gbpusd, how to, indicator, indicators, live, macd, magic, magic number, martingale, metatrader, mq4, mql, mql4, profitable, programmer, programming, real, signal, signals, simple, sma, step by step, stoch, stochastic, strategy, study, system, test, thank you, time, trader, trading

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •