Jump to content

4xmeter

Members
  • Posts

    212
  • Joined

  • Last visited

Posts posted by 4xmeter

  1. It is the same as the one below. However, this one is better. If you like Fibos then go to you tube and type Bobokus. He is the original author. You would learn 2 or 3 things with this dude.

     

    #property link "Modified by cja"

     

    #property indicator_chart_window

    #property indicator_buffers 3

    #property indicator_color1 Black

    #property indicator_color2 Black

    #property indicator_color3 Black

     

    extern int TimeFrame = 60;

    extern int Fibo_Num = 12345;

    extern color Intra_color = RoyalBlue;

    extern color Upper_color = Blue;

    extern color Lower_color = DodgerBlue;

    double g_price_96;

    double g_price_104;

    double gd_112;

    int g_datetime_120;

     

    int init() {

    return (0);

    }

     

    int deinit() {

    ObjectDelete("LongFibo" + Fibo_Num + "");

    ObjectDelete("ShortFibo" + Fibo_Num + "");

    ObjectDelete("IntradayFibo" + Fibo_Num + "");

    ObjectDelete("Fibo" + Fibo_Num + "");

    ObjectDelete("Fibo1" + Fibo_Num + "");

    return (0);

    }

     

    int DrawFibo() {

    string ls_0 = "";

    string ls_8 = "";

    if (TimeFrame == PERIOD_M1) return (-1);

    if (TimeFrame == PERIOD_M5) return (-1);

    if (TimeFrame == PERIOD_M15) return (-1);

    if (TimeFrame == PERIOD_M30) return (-1);

    if (TimeFrame == PERIOD_H1) ls_0 = "H1";

    if (TimeFrame == PERIOD_H4) ls_0 = "H4";

    if (TimeFrame == PERIOD_D1) ls_0 = "Daily";

    if (TimeFrame == PERIOD_W1) ls_0 = "Weekly";

    if (TimeFrame == PERIOD_MN1) ls_0 = "Monthly";

    if (TimeFrame == PERIOD_H1) ls_8 = "1 Hourly";

    if (TimeFrame == PERIOD_H4) ls_8 = "4 Hourly";

    if (TimeFrame == PERIOD_D1) ls_8 = "IntraDay";

    if (TimeFrame == PERIOD_W1) ls_8 = "IntraWeek";

    if (TimeFrame == PERIOD_MN1) ls_8 = "IntraMonth";

    if (ObjectFind("LongFibo" + Fibo_Num + "") == -1) ObjectCreate("LongFibo" + Fibo_Num + "", OBJ_FIBO, 0, g_datetime_120, g_price_96 + gd_112, g_datetime_120, g_price_96);

    else {

    ObjectSet("LongFibo" + Fibo_Num + "", OBJPROP_TIME2, g_datetime_120);

    ObjectSet("LongFibo" + Fibo_Num + "", OBJPROP_TIME1, g_datetime_120);

    ObjectSet("LongFibo" + Fibo_Num + "", OBJPROP_PRICE1, g_price_96 + gd_112);

    ObjectSet("LongFibo" + Fibo_Num + "", OBJPROP_PRICE2, g_price_96);

    }

    ObjectSet("LongFibo" + Fibo_Num + "", OBJPROP_LEVELCOLOR, Upper_color);

    ObjectSet("LongFibo" + Fibo_Num + "", OBJPROP_FIBOLEVELS, 4);

    ObjectSet("LongFibo" + Fibo_Num + "", OBJPROP_FIRSTLEVEL, 0.34);

    ObjectSetFiboDescription("LongFibo" + Fibo_Num + "", 0, "" + ls_0 + " Long Target 1 - %$");

    ObjectSet("LongFibo" + Fibo_Num + "", 211, 0.55);

    ObjectSetFiboDescription("LongFibo" + Fibo_Num + "", 1, "" + ls_0 + " Long Target 2 - %$");

    ObjectSet("LongFibo" + Fibo_Num + "", 212, 0.764);

    ObjectSetFiboDescription("LongFibo" + Fibo_Num + "", 2, "" + ls_0 + " Long Target 3 - %$");

    ObjectSet("LongFibo" + Fibo_Num + "", 213, 1.764);

    ObjectSetFiboDescription("LongFibo" + Fibo_Num + "", 3, "" + ls_0 + " Long Target 4 - %$");

    ObjectSet("LongFibo" + Fibo_Num + "", OBJPROP_RAY, TRUE);

    ObjectSet("LongFibo" + Fibo_Num + "", OBJPROP_BACK, TRUE);

    if (ObjectFind("ShortFibo" + Fibo_Num + "") == -1) ObjectCreate("ShortFibo" + Fibo_Num + "", OBJ_FIBO, 0, g_datetime_120, g_price_104 - gd_112, g_datetime_120, g_price_104);

    else {

    ObjectSet("ShortFibo" + Fibo_Num + "", OBJPROP_TIME2, g_datetime_120);

    ObjectSet("ShortFibo" + Fibo_Num + "", OBJPROP_TIME1, g_datetime_120);

    ObjectSet("ShortFibo" + Fibo_Num + "", OBJPROP_PRICE1, g_price_104 - gd_112);

    ObjectSet("ShortFibo" + Fibo_Num + "", OBJPROP_PRICE2, g_price_104);

    }

    ObjectSet("ShortFibo" + Fibo_Num + "", OBJPROP_LEVELCOLOR, Lower_color);

    ObjectSet("ShortFibo" + Fibo_Num + "", OBJPROP_FIBOLEVELS, 4);

    ObjectSet("ShortFibo" + Fibo_Num + "", OBJPROP_FIRSTLEVEL, 0.34);

    ObjectSetFiboDescription("ShortFibo" + Fibo_Num + "", 0, "" + ls_0 + " Short Target 1 - %$");

    ObjectSet("ShortFibo" + Fibo_Num + "", 211, 0.55);

    ObjectSetFiboDescription("ShortFibo" + Fibo_Num + "", 1, "" + ls_0 + " Short Target 2 - %$");

    ObjectSet("ShortFibo" + Fibo_Num + "", 212, 0.764);

    ObjectSetFiboDescription("ShortFibo" + Fibo_Num + "", 2, "" + ls_0 + " Short Target 3 - %$");

    ObjectSet("ShortFibo" + Fibo_Num + "", 213, 1.764);

    ObjectSetFiboDescription("ShortFibo" + Fibo_Num + "", 3, "" + ls_0 + " Short Target 4 - %$");

    ObjectSet("ShortFibo" + Fibo_Num + "", OBJPROP_RAY, TRUE);

    ObjectSet("ShortFibo" + Fibo_Num + "", OBJPROP_BACK, TRUE);

    if (ObjectFind("IntradayFibo" + Fibo_Num + "") == -1) ObjectCreate("IntradayFibo" + Fibo_Num + "", OBJ_FIBO, 0, g_datetime_120, g_price_96, g_datetime_120 + 60 * TimeFrame, g_price_104);

    else {

    ObjectSet("IntradayFibo" + Fibo_Num + "", OBJPROP_TIME2, g_datetime_120);

    ObjectSet("IntradayFibo" + Fibo_Num + "", OBJPROP_TIME1, g_datetime_120 + 60 * TimeFrame);

    ObjectSet("IntradayFibo" + Fibo_Num + "", OBJPROP_PRICE1, g_price_96);

    ObjectSet("IntradayFibo" + Fibo_Num + "", OBJPROP_PRICE2, g_price_104);

    }

    ObjectSet("IntradayFibo" + Fibo_Num + "", OBJPROP_LEVELCOLOR, Intra_color);

    ObjectSet("IntradayFibo" + Fibo_Num + "", OBJPROP_FIBOLEVELS, 7);

    ObjectSet("IntradayFibo" + Fibo_Num + "", OBJPROP_FIRSTLEVEL, 0.0);

    ObjectSetFiboDescription("IntradayFibo" + Fibo_Num + "", 0, "" + ls_8 + " Low - %$");

    ObjectSet("IntradayFibo" + Fibo_Num + "", 211, 0.191);

    ObjectSetFiboDescription("IntradayFibo" + Fibo_Num + "", 1, "" + ls_8 + " S1 - %$");

    ObjectSet("IntradayFibo" + Fibo_Num + "", 212, 0.382);

    ObjectSetFiboDescription("IntradayFibo" + Fibo_Num + "", 2, "" + ls_8 + " Short - %$");

    ObjectSet("IntradayFibo" + Fibo_Num + "", 213, 0.5);

    ObjectSetFiboDescription("IntradayFibo" + Fibo_Num + "", 3, "" + ls_8 + " Pivot - %$");

    ObjectSet("IntradayFibo" + Fibo_Num + "", 214, 0.618);

    ObjectSetFiboDescription("IntradayFibo" + Fibo_Num + "", 4, "" + ls_8 + " Long - %$");

    ObjectSet("IntradayFibo" + Fibo_Num + "", 215, 0.809);

    ObjectSetFiboDescription("IntradayFibo" + Fibo_Num + "", 5, "" + ls_8 + " R1 - %$");

    ObjectSet("IntradayFibo" + Fibo_Num + "", 216, 1.0);

    ObjectSetFiboDescription("IntradayFibo" + Fibo_Num + "", 6, "" + ls_8 + " High - %$");

    ObjectSet("IntradayFibo" + Fibo_Num + "", OBJPROP_RAY, TRUE);

    ObjectSet("IntradayFibo" + Fibo_Num + "", OBJPROP_BACK, TRUE);

    return (0);

    }

     

    int start() {

    int li_0 = iBarShift(NULL, TimeFrame, Time[0]) + 1;

    g_price_96 = iHigh(NULL, TimeFrame, li_0);

    g_price_104 = iLow(NULL, TimeFrame, li_0);

    g_datetime_120 = iTime(NULL, TimeFrame, li_0);

    if (TimeDayOfWeek(g_datetime_120) == 0) {

    g_price_96 = MathMax(g_price_96, iHigh(NULL, TimeFrame, li_0 + 1));

    g_price_104 = MathMin(g_price_104, iLow(NULL, TimeFrame, li_0 + 1));

    }

    gd_112 = g_price_96 - g_price_104;

    DrawFibo();

    string l_text_4 = "";

    string l_text_12 = "";

    if (TimeFrame == PERIOD_M1) {

    l_text_4 = "ERROR: Incorrect Fibo TimeFrame";

    l_text_12 = "Use only H1/H4/D1/W1/MN1";

    }

    if (TimeFrame == PERIOD_M5) {

    l_text_4 = "ERROR: Incorrect Fibo TimeFrame";

    l_text_12 = "Use only H1/H4/D1/W1/MN1";

    }

    if (TimeFrame == PERIOD_M15) {

    l_text_4 = "ERROR: Incorrect Fibo TimeFrame";

    l_text_12 = "Use only H1/H4/D1/W1/MN1";

    }

    if (TimeFrame == PERIOD_M30) {

    l_text_4 = "ERROR: Incorrect Fibo TimeFrame";

    l_text_12 = "Use only H1/H4/D1/W1/MN1";

    }

    ObjectDelete("Fibo" + Fibo_Num + "");

    ObjectCreate("Fibo" + Fibo_Num + "", OBJ_LABEL, 0, 0, 0);

    ObjectSetText("Fibo" + Fibo_Num + "", l_text_4, 20, "Verdana", Intra_color);

    ObjectSet("Fibo" + Fibo_Num + "", OBJPROP_CORNER, 1);

    ObjectSet("Fibo" + Fibo_Num + "", OBJPROP_XDISTANCE, 20);

    ObjectSet("Fibo" + Fibo_Num + "", OBJPROP_YDISTANCE, 36);

    ObjectDelete("Fibo1" + Fibo_Num + "");

    ObjectCreate("Fibo1" + Fibo_Num + "", OBJ_LABEL, 0, 0, 0);

    ObjectSetText("Fibo1" + Fibo_Num + "", l_text_12, 20, "Verdana", Intra_color);

    ObjectSet("Fibo1" + Fibo_Num + "", OBJPROP_CORNER, 1);

    ObjectSet("Fibo1" + Fibo_Num + "", OBJPROP_XDISTANCE, 20);

    ObjectSet("Fibo1" + Fibo_Num + "", OBJPROP_YDISTANCE, 66);

    return (0);

    }

  2.  

    What does this tell you? I

    I would had made more money by just making short trades at 1800hr than the system we have here.

     

    Interesting for sure. Someone once told me you want to make money at forex then only do short trades never long and you will win around 70% of them. I thought he was nuts but I am beginning to see his point.

     

    Honestly, you are wrong! The order, the system of being that I wrote about in my previous post is the trend. How you use it is you choice, but is not a matter of short or long trades. Is all about the trend and the change of the trend enclosed in its totality in a specific pattern. To know this behaviour is the art of Forex. Better said, to realize this is the art of Forex.

     

    I have no information to provide about this system since I use no one system but my own. I never quit learning, therefore, it is just a learning tool for me. To get here it took hard work and money.

     

    Work Fears The Busy Men!

     

    Enough! I strongly second that!!!

  3. According to the scientists the most random force in the universe are the magnetic fields. Guess what? They just found an order, among the chaos. Therefore, everything in the universe has an order, a system of being. Forex particularly isn't a divine occurrence phenomenon, so its order depends more on human behaviour than mathematics. The nazis of the new world order are experts in studying this human behaviour, to be able to manipulate the masses. Anyhow that is beyond the point. There is an order in Forex, but because depends more on human behaviour (emotions, beliefs, preferences) its center isn,t fix, meaning it moves and to find out when it does constitute the art of Forex.
  4. Actually your incorrect but I will be nice you may wish to work on your delivery lol

    You should know even more than others we are dealing in a realm that is virtually unknown.

    Therefore nothing is useless. You bring everything to the party nothing i wasted it's all has value.

     

    Now do not care about the trend that is not what I am looking for.

     

    More later

     

    Patheway

     

    Looking for fish? Do not climb a tree

     

    Oh! Artificially me!

  5. I'm interested in this course too, now maybe i'm on the way to break some forum rules but at the same time i'm quite fed up to see all this inconclusive begging, so if somebody is really interested we can split the cost and then share to the community.

     

    No thanks.

     

    Behind a forex system for sale; there is a frustrated trader!

     

    Tact. Accept your position, however humble, and be content, for now, to be effective in it. Be simple, free, and uncomplicated.

  6. "coeff goes up = variability goes up and use a simple 5-9 ma cross to get the direction or use CCI or RSI or whatever other stuff you like. I use pure candlestick PA. By coeff we are converting stdev into percentile value based on previous data. So... by using stdev we can only know how strong the trend is but by using coeff we can know how strong the trend is in percentile

     

     

    "So enter when coeff is going up and not going down. When its going down thats the retracement and unless it picks up again, we are either retracing or ranging."

     

    Coeff can be used as a filter to your existing system to eliminate whipsaw."

  7. A filter!

     

     

    #property copyright "Copyright © 2008, MetaQuotes Software Corp."

    #property link ""

     

    #property indicator_separate_window

    #property indicator_buffers 1

    #property indicator_color1 CLR_NONE

     

    extern int lookback = 14;

    extern color linecolor = Crimson;

    double g_ibuf_84[];

     

    int init() {

    SetIndexStyle(0, DRAW_LINE, EMPTY, EMPTY, linecolor);

    SetIndexBuffer(0, g_ibuf_84);

    return (0);

    }

     

    int deinit() {

    return (0);

    }

     

    int start() {

    double ld_4;

    double ld_12;

    int l_ind_counted_0 = IndicatorCounted();

    for (int li_20 = Bars - lookback; li_20 >= 0; li_20--) {

    ld_4 = 0;

    ld_12 = 0;

    for (int l_count_24 = 0; l_count_24 < lookback; l_count_24++) ld_4 += Close[li_20 + l_count_24];

    if (li_20 == 0) Print(ld_4);

    ld_4 /= lookback;

    for (l_count_24 = 0; l_count_24 < lookback; l_count_24++) ld_12 += (Close[li_20 + l_count_24] - ld_4) * (Close[li_20 + l_count_24] - ld_4) / Point;

    ld_12 /= (lookback - 1);

    ld_12 = MathSqrt(ld_12);

    g_ibuf_84[li_20] = 100.0 * (ld_12 / ld_4);

    Comment(ld_4, ld_12);

    }

    return (0);

    }

  8. For some the propaganda must therefore always be essentially simple and repetitious. The most brilliant propagandist technique will yield no success unless one fundamental principle is borne in mind constantly, which must be confined itself to a few points and repeat them over-and-over to a mind weary satiation.

     

    For others, by trial creating their own individual system according to their own individual personality the goal for which we have striven so concertedly is within their reach and because of its fulfilment is so apparent it behoves us to increase our efforts and our caution tenfold. Let accept this process as it is, without prejudice; letting the arena of my own errors speak for themselves.

  9. Quicksilver you give a shitty links! First your modification of Rebellion is on Russian forum I cannot read and then the currency meter is on forum I have to be a member to download. Ask me ID and password. Why you cannot upload it to some human friendly upload site like mega-upload or so?

    Ponimajes? No kudos for that kind of help.

    Hermes

     

    Time Saver!

  10. Hi

    Is there an indicator out there that will place/play sound alerts at

    multiple levels? I know Metatrader can do it, but I would like an

    indicator that once set at trade levels - 15 pips for example, with user imput of start price - will always maintain the same distance, & play the same alerts.

     

    I have been trying for almost two year now :hammer: to get such indicator as described above without any results. I have found out that those capable to respond to request such as this act like terrified entities. I wonder, Why? :-$ >:) Perhaps, this forum makes a difference! I [-O< . Manually is very tedious. A Pencil and paper thing. Please.

  11. Re: the dollar last night

     

    The reason the dollar has been so strong lately is due to the Chinese selling their U.S treasury bonds left and right; with such action relinquishing the no.1 spot to Japan . So, the demands for dollars has increased to be able to pay them. However, that is a good info to know a why? but not fundamental in trading decisions. As a trader NEVER get involved emotionally, simply trade the entry and exit strategy of your system. Do not get involved emotionally in nothing else; if you do (hoping) it will destroy you. So, again my advice to you is do not get involved emotionally. Just Trade the System. A good system is one that force you to follow the trend if there is one and not the price. There lies the secret. I learned that after my account was wiped out.

  12. Re: Pipsmark V3 Indicator

     

    As you know, the indicator has as reference point the moving average; specified by the user and that determines its range by the number of pips selected. Could any programmer in this forum, (Williams, SEFC or Sharpeye) please 'fix it' in a way that the reference point could be any price (input) by the user instead of only the MA? >:) Thanks

  13. 8-) No :?:

     

     

     

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

    //| PipsMark.mq4 |

    //| Ted Goulden |

    //| |

    // This indicator will mark the newest bar with an arrow if its high/Low

    // exceeds the input MA by the input number of pips. There is also

    // an alert feature that can be selected.

    //

    //

    // Input Parameters:

    //

    // InputMAVal - the number of periods to be used by the MA calculation. - the number of periods to be used by the MA calculation.

    // InputMAtype - the type of MA to be used for MA calculation.

    // PipSignal - the arrow appears if this number of pips above/below the MA is exceeded.

    // NoAlert - controls whether an audible alert is given.

    //

    // Modification History:

    // Oct 26 09 - Ted Goulden, Initial Version

    // Oct 28 09 - Ted Goulden, added comment string

    // Feb 07 10 - flyer415 , can now select other MA inputs

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

    #property copyright "Ted Goulden"

    #property link ""

     

    #property indicator_chart_window

     

    #include <stdlib.mqh>

     

     

    //---- input parameters

    extern int InputMAval=10;

    extern int InputMAtype=1; // 0 for Simple, 1 for Exponential

    extern int InputMAshift=0;

    extern int InputMAprice=0;

    extern int PipSignal=20;

    extern bool NoAlert=true;

     

    double pips, pf = 1., ff = 1.;

    bool alertDone = false;

    int barStart = 0;

    string ArrowName1 = "", ArrowName2 = "";

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

    //| Custom indicator initialization function |

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

    int init()

    {

    //---- indicators

     

     

    pips = MarketInfo(Symbol(), MODE_TICKSIZE);

    if (Digits < 4)

    {

    pf = (0.01/pips);

    ff = (pips/0.001);

    }

    if (Digits > 3)

    {

    pf = (0.0001/pips);

    ff = (pips/0.00001);

    }

     

    //----

    return(0);

    }

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

    //| Custom indicator deinitialization function |

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

    int deinit()

    {

    //----

    Comment ("");

    ObjectDelete(ArrowName1);

    ObjectDelete(ArrowName2);

    //----

    return(0);

    }

     

     

     

    void SetArrow(string ArrowName, datetime ArrowTime, double Price,

    double ArrowCode, color ArrowColor, bool LimitArrow)

    {

    int err;

     

    // Note, if ArrowName was already used, the object will be replaced by current arrow.

    if (ObjectFind(ArrowName) != -1) ObjectDelete(ArrowName);

    if(!ObjectCreate(ArrowName, OBJ_ARROW, 0, ArrowTime, Price))

    {

    err=GetLastError();

    Print("error: can't create Arrow! code #",err," ",ErrorDescription(err));

    return;

    }

    else

    {

    ObjectSet(ArrowName, OBJPROP_ARROWCODE, ArrowCode);

    ObjectSet(ArrowName, OBJPROP_COLOR, ArrowColor);

    ObjectSet(ArrowName, OBJPROP_WIDTH, 2);

     

    ObjectsRedraw();

    }

    } // end function

     

     

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

    //| Custom indicator iteration function |

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

     

    int start()

    {

    int counted_bars=IndicatorCounted();

    //----

    if (barStart < Time[0]) //start of new bar

    {

    Comment ("");

    if (ArrowName1 > "") ObjectDelete(ArrowName1);

    if (ArrowName2 > "") ObjectDelete(ArrowName2);

    barStart = Time[0];

    alertDone = false;

    }

     

    if (InputMAval > 0) double maVal = iMA(NULL, 0, InputMAval, InputMAshift, InputMAtype, InputMAprice, 0);

    ArrowName1 = TimeToStr(Time[0])+"lo"+Symbol();

    ArrowName2 = TimeToStr(Time[0])+"hi"+Symbol();

    double typicalPrice = (High[0] + Low[0] + Close[0])/3;

    double diff1 = MathRound((typicalPrice - maVal)/Point);

    double diff2 = MathRound((maVal - typicalPrice )/Point);

    if (( diff1 > PipSignal*pf) || ( diff2 > PipSignal*pf))

    {

    if (diff2 > PipSignal*pf)

    {

    SetArrow(ArrowName1, Time[0], Low[0], 233, Purple, false);

    if (!NoAlert && !alertDone) Alert(Symbol(), " Pips diff : ", NormalizeDouble(diff2, 0));

    Comment (" Price is below ", InputMAval, " moving average");

    alertDone = true;

    }

    if (diff1 > PipSignal*pf)

    {

    SetArrow(ArrowName2, Time[0], High[0] + 15*Point, 234,DodgerBlue, false);

    if (!NoAlert && !alertDone) Alert(Symbol(), " Pips diff : ", NormalizeDouble(diff1, 0));

    Comment (" Price is above ", InputMAval, " moving average");

    alertDone = true;

    }

    }

    else Comment ("");

     

     

    //----

    return(0);

    }

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

    8-)

  14. Re: REQ: Trend Line - Pip Move Alert

     

    You could use manually the Hline indicator with alert (below). Just place it as s/r as specify by you.

     

     

    #property copyright "[email protected]"

    #property link ""

     

    #property indicator_chart_window

     

    extern string LineName = "MyLine1";

    extern color LineColor = AliceBlue;

    extern int LineStyle = 0;

    extern int AlertPipRange = 5;

    extern string AlertWav = "alert.wav";

     

    int init() {

    return (0);

    }

     

    int deinit() {

    return (0);

    }

     

    int start() {

    int l_ind_counted_0 = IndicatorCounted();

    ObjectCreate(LineName, OBJ_HLINE, 0, 0, Bid);

    ObjectSet(LineName, OBJPROP_STYLE, LineStyle);

    ObjectSet(LineName, OBJPROP_COLOR, LineColor);

    double ld_4 = ObjectGet(LineName, OBJPROP_PRICE1);

    if (Bid - AlertPipRange * Point <= ld_4 && Bid + AlertPipRange * Point >= ld_4) PlaySound(AlertWav);

    return (0);

    }

  15. Re: TrendlineRange Indicator

     

    Here are the instructions by the Author.

     

    The matter of the indicator is as follows: when the price approaches to the support/resistance line by 20, 10 and 5 points (these are default values that can be changed by desire), the indicator will produce one signal (Alert) if the price is located in the spaces before the trend line (20<=Price<10), (10<=Price<5), (5<=Price=0), but doesn't bury the user with signals at every tick. The only thing is that the indicator will produce several signals when the price moves from one space into another.

     

    It also shows the current distance from the price to the support/resistance line in the upper left corner (Comment).

     

     

    The following is contained by the signal:

     

    Range - distance from the price to the support/resistance line;

     

    Price - current price;

     

    TrendLine - current location of the support/resistance line.

     

    The following must be introduced in settings:

     

    PointsRange1 - the first (largest) distance to the trend line, at which the signal will be produced;

     

    PointsRange2 - the second (medium) distance to the trend line, at which the signal will be produced;

     

    PointsRange3 - the third (small) distance to the trend line, at which the signal will be produced;

     

    IndexTrendLine - index, exactly the index of the trend line, which you can see in the list of objects.

     

    The values of distances 1, 2 and 3 must be introduced in decreasing order!!!

  16. You have to draw a trendline of your swing Price movement that you are measuring; and write down the number of the trendline that is given when you place you mouse over it in the input of the indicator under Index TrendLine _______.

     

    I can not qualify the performance of this indicator, as of today; however, it is in the right direction for (Sharpeyes 8-) )!

    Could some one make it more user friendly! Please!

     

     

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

    //| TrendLineRange.mq4 |

    //| Ñîêðàòèëèí Àëåêñåé |

    //| [email protected] |

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

    #property copyright "Ñîêðàòèëèí Àëåêñåé"

    #property link "[email protected]"

     

    #property indicator_chart_window

    //---- input parameters

    extern int PointsRange1=20; //1-îå ðàññòîÿíèå äî òðåíäîâîé ëèíèè

    extern int PointsRange2=10; //2-îå ðàññòîÿíèå äî òðåíäîâîé ëèíèè

    extern int PointsRange3=5; //3-åå ðàññòîÿíèå äî òðåíäîâîé ëèíèè

    extern string IndexTrendLine; //Èíäåêñ òðåíäîâîé ëèíèè â ñïèñêå îáúåêòîâ

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

    //| Custom indicator initialization function |

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

    int init()

    {

    //---- indicators

     

    //----

    return(0);

    }

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

    //| Custom indicator deinitialization function |

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

    int deinit()

    {

    //----

    //----

    return(0);

    }

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

    //| Custom indicator iteration function |

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

    int start()

    {

    static int S1,S2,S3; //Ñ÷åò÷èêè ñèãíàëîâ

    string TrendLine="Trendline "+IndexTrendLine; //Äîáàâëåíèå èíäåêñà òåíäîâîé ëèíèè ê "Trendline"

    double Price=Bid; //Òåêóùàÿ öåíà

    double TrendLineValue=NormalizeDouble(ObjectGetValueByShift(TrendLine,0),Digits); //Òåêóùåå çíà÷åíèå òðåíäîâîé ëèíèè

     

    int Range=MathAbs((NormalizeDouble(Price,Digits)-TrendLineValue)*MathPow(10,Digits));

    //Âû÷èñëåíèå ðàññòîÿíèÿ ìåæäó òåêóùåé öåíîé è òðåíäîâîé ëèíèåé

     

    Comment("Range=",Range);

     

    if (Range<=PointsRange1 && Range>PointsRange2 && S1==0) //Åñëè òåêóùåå ðàñññòîÿíèå <= ðàññòîÿíèÿ1 è > ðàññòîÿíèÿ2

    { //ñèãíàë íà ýòîì ïðîìåæóòêå íå ïîäàâàëñÿ, òî ïîäàåì îäèí ñèãíàë.

    Alert("Range=",Range," Price=",Price," TrendLine=",TrendLineValue);

    S1=1; S2=0; S3=0; //Îáíóëåíèå ñ÷åò÷èêîâ

    }

    else

    if (Range<=PointsRange2 && Range>PointsRange3 && S2==0) //Åñëè òåêóùåå ðàñññòîÿíèå <= ðàññòîÿíèÿ2 è > ðàññòîÿíèÿ3

    { //ñèãíàë íà ýòîì ïðîìåæóòêå íå ïîäàâàëñÿ, òî ïîäàåì îäèí ñèãíàë.

    Alert("Range=", Range, " Price=", Price, " TrendLine=",TrendLineValue);

    S1=0; S2=1; S3=0; //Îáíóëåíèå ñ÷åò÷èêîâ

    }

    else

    if (Range<=PointsRange3 && S3==0) //Åñëè òåêóùåå ðàñññòîÿíèå <= ðàññòîÿíèÿ3

    { //ñèãíàë íà ýòîì ïðîìåæóòêå íå ïîäàâàëñÿ, òî ïîäàåì îäèí ñèãíàë.

    Alert("Range=", Range, " Price=", Price, " TrendLine=",TrendLineValue);

    S1=0; S2=0; S3=1; //Îáíóëåíèå ñ÷åò÷èêîâ

    }

     

    return(0);

    }

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

×
×
  • Create New...