Jump to content

matria2009

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by matria2009

  1. Well better is not what I would call it yet. If it works then it's better.

    There are some big changes.

    The biggest one being the LPR with the old one you were given only 3 templates for the GU,GY one other I forget as I don't trade that pair. The new version has one template for all pairs to trade.

    This works together with 20 more indicators that give you Highs and lows for a whole year.

    t probably will not hurt to share this piece of code.

    This is a sample of what the new 20 indicators are a part of.

    I have taken some of the code off on purpose and would appreciate it if no one at ths time try to make a indicator from the code. Once I find out for sure that I can share without any harm to my friend I will share it no problem.

    The code below is for a 5day LPR we have 20 of these on different time frames like 30day LPr,144 day LPR,365day LPR and so forth.

    I really do not know exactly what this code does. I am sure some members here do.

     

    enjoy

     

    Patheway

    //+------------------------------------------------------------------+

    //| 5 Day LPR.mq4 |

    //| Copyright © 2009, Fx Boom |

    //| http://www.fxboom.com |

    //+------------------------------------------------------------------+

    #property copyright "Copyright © 2009, Fx Boom"

    #property link "http://www.fxboom.com"

     

     

    //---- input parameters

    extern int DAYS=5;

     

    //---- Variables

    double yesterday_close,Current_price;

    double phigh,plow,plownew;

    int i=1;

     

    //---- Buffers

    double daily_high[20] ;

    double daily_low[20] ;

     

    //+------------------------------------------------------------------+

    //| Custom indicator initialization function |

    //+------------------------------------------------------------------+

    int init()

    {

    //---- indicators

    //----

    return(0);

    }

     

    //+------------------------------------------------------------------+

    //| Custom indicator deinitialization function |

    //+------------------------------------------------------------------+

    int deinit()

    {

    //----

     

    //----

    return(0);

    }

     

    //+------------------------------------------------------------------+

    //| Custom indicator iteration function |

    //+------------------------------------------------------------------+

     

    int counted_bars=IndicatorCounted();

    //----

    Current_price= MarketInfo( Symbol(), MODE_BID);

    //---- TODO: add your code here

    ArrayResize( daily_high, DAYS);

    ArrayResize( daily_low, DAYS);

    ArrayInitialize( daily_high, 0);

    ArrayInitialize( daily_low, 0);

    ArrayCopySeries( daily_low, MODE_LOW, Symbol(), PERIOD_D1);

    ArrayCopySeries( daily_high, MODE_HIGH, Symbol(), PERIOD_D1);

    /* initialise */

    plow = daily_low[ 1];

    phigh = daily_high[1];

    for(i=1;i<DAYS; i++)

    {

    if(plow > daily_low)

    {

    plow = daily_low ;

    }

     

    for(i=1;i<DAYS; i++)

    {

    if(phigh < daily_high)

    {

    phigh = daily_high[ i];

    }

    }

     

    Comment("\n5dayH ",phigh,"\n5dayL ",plow);

     

    ObjectDelete( "5dayHigh" );

    ObjectDelete( "5dayLow" );

     

    ObjectCreate( "5dayHigh" , OBJ_HLINE,0, CurTime(),phigh) ;

    ObjectSet("5dayHigh ",OBJPROP_COLOR,SpringGreen);

    ObjectSet("5dayHigh ",OBJPROP_STYLE,STYLE_SOLID);

     

    ObjectCreate( "5dayLow" , OBJ_HLINE,0, CurTime(),plow) ;

    ObjectSet("5dayLow" ,OBJPROP_COLOR,Red) ;

    ObjectSet("5dayLow" ,OBJPROP_STYLE,STYLE_SOLID);

     

    ObjectsRedraw( );

     

    if (Bid <= plow)

    {

    // Alert(Symbol( ), " has hit a 5 day LOW. Bounce or Breakout?"," -",plow);

    }

     

    if (Bid >= phigh)

    {

    //Alert(Symbol( ), " has hit a 5 day HIGH. Bounce or Breakout?"," -",phigh);

     

    sorry not work

×
×
  • Create New...