Results 1 to 9 of 9
 7 Attachment(s)    

Thread: Jma Fast Ea

  1. #1

    Default Jma Fast Ea

    need a good ea who make money ive chech renko ea and the result is really bad

    u can make ea based on jma fast ea i think i can make good result?
    bar close over jma=buy
    bar close under jma close position + sell

    //+-----------------------------------------------------------+
    #property indicator_chart_window
    #property indicator_buffers 1
    #property indicator_color1 Blue

    //---- input parameters
    extern int Length= 300;
    extern int Phase= 0;


    //---- buffers
    double ExtMapBuffer1[];



    //+------------------------------------------------------------------+
    //| Custom indicator initialization function |
    //+------------------------------------------------------------------+
    int init()
    {
    SetIndexStyle(0,DRAW_LINE);
    SetIndexBuffer(0,ExtMapBuffer1);

    IndicatorShortName("JMA("+Length+","+Phase+")");

    return(0);
    }


    //+------------------------------------------------------------------+
    //| Custom indicator start function (on each tick) |
    //+------------------------------------------------------------------+
    int start()
    {
    int counted_bars= IndicatorCounted(),
    lastbar;

    if (counted_bars>0)
    counted_bars--;

    lastbar= Bars- counted_bars;

    JMAFast(0, lastbar, Length, Phase);


    }


    //+------------------------------------------------------------------+
    //| Fast computation of JMA - Here's the Beef |
    //+------------------------------------------------------------------+
    int JMAFast(int offset, int lastbar, int length, int phase)
    {
    //----
    // variable definitions
    int shift= 0, jj= 0, ii= 0;
    int swing_in= 127;
    int v5= 0, v6= 0, s38= 0, s40= 0, s48= 0, s50= 0, s58= 0, s60= 0, fF0= 0,value2= 0;
    double series= 0, vv= 0, v1= 0, v2= 0, v3= 0, v4= 0, s8= 0, s10= 0, s18= 0, s20= 0, s28= 0, s30= 0,
    s68= 0, s70= 0, f8= 0, f10= 0, f18= 0, f20= 0, f28= 0, f30= 0, f38= 0,
    f40= 0, f48= 0, f50= 0, f58= 0, f60= 0, f68= 0, f70= 0, f78= 0, f80= 0, f88= 0,
    f90= 0, f98= 0, fA0= 0, fA8= 0, fB0= 0, fB8= 0, fC0= 0, fC8= 0, fD0= 0, f0= 0,
    fD8= 0, fE0= 0, fE8= 0, fF8= 0, JMA= 0, prevtime= 0;
    double list[127];
    double ring1[127];
    double ring2[10];
    double buffer[61];

    ArrayInitialize(list,0);
    ArrayInitialize(ring1,0);
    ArrayInitialize(ring2,0);
    ArrayInitialize(buffer,0);


    lastbar= MathMin(Bars-length-1, lastbar);
    lastbar= MathMin(Bars-swing_in, lastbar);


    {
    s28= 63;
    s30= 64;
    for ( ii= 1 ; ii <= s28 ; ii++) {
    list[ii]= -1000000;
    }

    for ( ii= s30 ; ii <= 127 ; ii++ ) {
    list[ii]= 1000000;
    }

    f0= 1;
    }

    //{--------------------------------------------------------------------}
    for (shift= lastbar+swing_in; shift>=offset; shift--)
    {
    series= Close[shift];

    if (fF0 < 61) {
    fF0= fF0 + 1;
    buffer[fF0]= series;
    }

    //{--------------------------------------------------------------------}
    // { main cycle }

    if (fF0 > 30) {
    if (length < 1.0000000002) {
    f80= 0.0000000001; //{1.0e-10}
    }
    else {
    f80= (length - 1) / 2.0;
    }

    if (phase < -100) {
    f10= 0.5;
    }
    else
    if (phase > 100) {
    f10= 2.5;
    }
    else {
    f10= phase / 100 + 1.5;
    }

    v1= MathLog(MathSqrt(f80));
    v2= v1;
    if (v1 / MathLog(2.0) + 2.0 < 0.0) {
    v3= 0;
    }
    else {
    v3= v2 / MathLog(2.0) + 2.0;
    }

    f98= v3;

    if (0.5 <= f98 - 2.0) {
    f88= f98 - 2.0;
    }
    else {
    f88= 0.5;
    }

    f78= MathSqrt(f80) * f98;
    f90= f78 / (f78 + 1.0);
    f80= f80 * 0.9;
    f50= f80 / (f80 + 2.0);

    if (f0 != 0) {
    f0= 0;
    v5= 0;
    for ( ii= 1 ; ii <=29 ; ii++ ) {
    if (buffer[ii+1] != buffer[ii]) {
    v5= 1.0;
    }
    }

    fD8= v5*30.0;
    if (fD8 == 0) {
    f38= series;
    }
    else {
    f38= buffer[1];
    }

    f18= f38;
    if (fD8 > 29)
    fD8= 29;
    }
    else
    fD8= 0;

    for ( ii= fD8 ; ii >= 0 ; ii-- ) { //{ another bigcycle...}
    value2=31-ii;
    if (ii == 0) {
    f8= series;
    }
    else {
    f8= buffer[value2];
    }

    f28= f8 - f18;
    f48= f8 - f38;
    if (MathAbs(f28) > MathAbs(f48)) {
    v2= MathAbs(f28);
    }
    else {
    v2= MathAbs(f48);
    }

    fA0= v2;
    vv= fA0 + 0.0000000001; //{1.0e-10;}

    if (s48 <= 1) {
    s48= 127;
    }
    else {
    s48= s48 - 1;
    }

    if (s50 <= 1) {
    s50= 10;
    }
    else {
    s50= s50 - 1;
    }

    if (s70 < 128)
    s70= s70 + 1;

    s8= s8 + vv - ring2[s50];
    ring2[s50]= vv;

    if (s70 > 10) {
    s20= s8 / 10;
    }
    else
    s20= s8 / s70;

    if (s70 > 127) {
    s10= ring1[s48];
    ring1[s48]= s20;
    s68= 64;
    s58= s68;
    while (s68 > 1) {
    if (list[s58] < s10) {
    s68= s68 *0.5;
    s58= s58 + s68;
    }
    else
    if (list[s58] <= s10) {
    s68= 1;
    }
    else {
    s68= s68 *0.5;
    s58= s58 - s68;
    }
    }
    }
    else {
    ring1[s48]= s20;
    if (s28 + s30 > 127) {
    s30= s30 - 1;
    s58= s30;
    }
    else {
    s28= s28 + 1;
    s58= s28;
    }

    if (s28 > 96) {
    s38= 96;
    }
    else
    s38= s28;

    if (s30 < 32) {
    s40= 32;
    }
    else
    s40= s30;
    }

    s68= 64;
    s60= s68;
    while (s68 > 1) {
    if (list[s60] >= s20) {
    if (list[s60 - 1] <= s20) {
    s68= 1;
    }
    else {
    s68= s68 *0.5;
    s60= s60 - s68;
    }
    }
    else {
    s68= s68 *0.5;
    s60= s60 + s68;
    }

    if ((s60 == 127) && (s20 > list[127]))
    s60= 128;
    }

    if (s70 > 127) {
    if (s58 >= s60) {
    if ((s38 + 1 > s60) && (s40 - 1 < s60)) {
    s18= s18 + s20;
    }
    else
    if ((s40 > s60) && (s40 - 1 < s58))
    s18= s18 + list[s40 - 1];
    }
    else
    if (s40 >= s60) {
    if ((s38 + 1 < s60) && (s38 + 1 > s58))
    s18= s18 + list[s38 + 1];
    }
    else
    if (s38 + 2 > s60) {
    s18= s18 + s20;
    }
    else
    if ((s38 + 1 < s60) && (s38 + 1 > s58))
    s18= s18 + list[s38 + 1];

    if (s58 > s60) {
    if ((s40 - 1 < s58) && (s38 + 1 > s58)) {
    s18= s18 - list[s58];
    }
    else
    if ((s38 < s58) && (s38 + 1 > s60))
    s18= s18 - list[s38];
    }
    else {
    if ((s38 + 1 > s58) && (s40 - 1 < s58)) {
    s18= s18 - list[s58];
    }
    else
    if ((s40 > s58) && (s40 < s60))
    s18= s18 - list[s40];
    }
    }

    if (s58 <= s60) {
    if (s58 >= s60) {
    list[s60]= s20;
    }
    else {
    for ( jj= s58 + 1 ; jj <= s60 - 1 ; jj++ ) {
    list[jj - 1]= list[jj];
    }
    list[s60 - 1]= s20;
    }
    }
    else
    {
    for ( jj= s58 - 1 ; jj >= s60 ; jj-- ) {
    list[jj + 1]= list[jj];
    }
    list[s60]= s20;
    }

    if (s70 <= 127) {
    s18= 0;
    for (jj= s40 ; jj <= s38 ; jj++) {
    s18= s18 + list[jj];
    }
    }

    f60= s18 / (s38 - s40 + 1);
    if (fF8 + 1 > 31) {
    fF8= 31;
    }
    else
    fF8= fF8 + 1;

    if (fF8 <= 30) {
    if (f28 > 0) {
    f18= f8;
    }
    else
    f18= f8 - f28 * f90;

    if (f48 < 0) {
    f38= f8;
    }
    else
    f38= f8 - f48 * f90;

    fB8= series;

    //{EasyLanguage does not have "continue" statement}
    if (fF8 != 30) {
    continue;
    }

    if (fF8 == 30) {
    fC0= series;
    if (MathCeil(f78) >= 1) {
    v4= MathCeil(f78);
    }
    else
    v4= 1;

    fE8= MathCeil(v4);

    if (MathFloor(f78) >= 1) {
    v2= MathFloor(f78);
    }
    else
    v2= 1;

    fE0= MathCeil(v2);

    if (fE8 == fE0) {
    f68= 1;
    }
    else {
    v4= fE8 - fE0;
    f68= (f78 - fE0) / v4;
    }

    if (fE0 <= 29) {
    v5= fE0;
    }
    else
    v5= 29;

    if (fE8 <= 29) {
    v6= fE8;
    }
    else
    v6= 29;

    fA8= (series - buffer[fF0 - v5]) * (1 - f68) / fE0 + (series - buffer[fF0 - v6]) * f68 / fE8;
    }
    }
    else
    {
    if (f98 >= MathPow(fA0/f60, f88)) {
    v1= MathPow(fA0/f60, f88);
    }
    else
    v1= f98;

    if (v1 < 1) {
    v2= 1;
    }
    else {
    if (f98 >= MathPow(fA0/f60, f88)) {
    v3= MathPow(fA0/f60, f88);
    }
    else
    v3= f98;

    v2= v3;
    }

    f58= v2;
    f70= MathPow(f90, MathSqrt(f58));

    if (f28 > 0) {
    f18= f8;
    }
    else {
    f18= f8 - f28 * f70;
    }

    if (f48 < 0) {
    f38= f8;
    }
    else {
    f38= f8 - f48 * f70;
    }
    }
    }

    if (fF8 > 30) {
    f30= MathPow(f50, f58);
    fC0= (1 - f30) * series + f30 * fC0;
    fC8= (series - fC0) * (1 - f50) + f50 * fC8;
    fD0= f10 * fC8 + fC0;
    f20= -f30 * 2;
    f40= f30 * f30;
    fB0= f20 + f40 + 1;
    fA8= (fD0 - fB8) * fB0 + f40 * fA8;
    fB8= fB8 + fA8;
    }

    JMA= fB8;
    }

    if (fF0 <= 30) {
    JMA= 0;
    }

    if (shift<=lastbar)
    ExtMapBuffer1[shift]= JMA;
    }

    //----
    return(0);
    }
    //+------------------------------------------------------------------+

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

    Default

    Ok here is the JMA Fast Expert Advisor.
    Attached Files Attached Files

  3. #3

    Default

    funnyo u can add this filter laguerre filter
    if bar close over fast + laguerre filter=buy
    if bar close under fast + laguerre filter=close position+sell
    Attached Files Attached Files

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

    Default

    Quote Originally Posted by pillso View Post
    funnyo u can add this filter laguerre filter
    if bar close over fast + laguerre filter=buy
    if bar close under fast + laguerre filter=close position+sell


    Here it is. JMA Fast LaguerreFilter EA. The two indicators are required.
    Attached Files Attached Files

  5. #5

    Default

    thank great job
    it make huge profit this month

  6. #6

    Default

    What settings and timeframe are you using for this ea?

  7. #7

    Default

    i search its difficult because the past is not the same i believe this ma move strange
    i test with 300 200 65 30 on 1 min
    but in flat market it look not super

  8. #8

    Default

    i need another filter zerolag stoc indiactor

    it make a good filter
    buy if bar close over rsi filter + fast + sto blue line over red line
    Attached Images Attached Images Jma Fast Ea-sto-gif 

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

    Default

    Quote Originally Posted by pillso View Post
    i need another filter zerolag stoc indiactor

    it make a good filter
    buy if bar close over rsi filter + fast + sto blue line over red line
    Here is the JMA Laguerre ZeroLagStochs EA.
    Attached Files Attached Files

Similar Threads

  1. Fast Buttons expert for MetaTrader 4
    By sxTed in forum Commercial expert advisors
    Replies: 0
    Last Post: 02-05-2015, 15:11
  2. Fast Scalping EA
    By Fast Scalping in forum Expert advisors live statements
    Replies: 13
    Last Post: 01-30-2014, 08:50
  3. Fast Tick Scalper.
    By 100pipsv3.1[1]ea in forum Expert advisors backtesting
    Replies: 1
    Last Post: 07-10-2013, 10:24
  4. Fast And Furious
    By NICK35 in forum Expert advisors backtesting
    Replies: 54
    Last Post: 03-16-2009, 14:09

Tags for this Thread

100, advisor, backtesting, color, custom indicator, expert, expert advisor, indicator, indicators, main, money, profit, renko, rsi, test

Posting Permissions

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