Jump to content

4xmeter

Members
  • Posts

    212
  • Joined

  • Last visited

Posts posted by 4xmeter

  1. Richard Russel:

     

    Unbeknownst to most gold and silver shares, coins and bullion have been under accumulation since 2000, by the smart money. Gold alone on a compound basis has been up just under 20% annually. It should also be noted that gold demand rose 36% in the second quarter.

     

    Several events of recent vintage have changed the atmosphere in which gold and silver reside. Six or eight months ago the major NYC banks arranged for a major rally in the dollar, which ran from 74 to 89. It is now back to 79. The problems in Greece were the catalyst, as well as other EU-euro zone member problems. This caused the euro to fall from $1.50 to $1.19. It is now at $1.35. This temporarily boosted the dollar. About 11 weeks ago we predicted a new quantitative easing program in the US and it was put into operation about a month ago. This is the way the Federal Reserve again intends to keep the US economy from collapsing. The result of this move is that again foreign central banks are moving to cheapen their currencies, because the dollar is again falling in value. That is reflected in the increasing foreign exchange dollar reserves of many countries. What they do to cheapen their currencies in US dollar terms is to print their own national currency and purchase dollars. With those dollars they buy US Treasuries or spend them. That process cheapens their currency in dollar terms. This is called intervention.

     

    The prevailing attitude is that if a nation doesn’t cheapen its currency others will and that would leave a nation at a disadvantage in terms of trade and pricing exports. This has been going on for years and US administrations have overlooked the practice. That is because it cheapens exports into the US, holds down inflation and creates buyers for Treasury and Agency bonds and US stocks and investments. Unfortunately for the US other nations have decided US debt is so onerous that they are diversifying into other currencies, purchasing items such as commodities and in some cases buying gold. The argument against gold has been that there is no interest on the investment. They perpetually do not understand that gold has been appreciating in value for the last ten years just shy of 20% annually. Thus their argument for not owning gold is incorrect. It has cost nations dearly and will continue to do so. The real reason that they do not purchase gold is because of pressure from the US government.

     

    The most visible intervention in the currency markets was that of Japan in a desperate attempt to cheapen the value of the yen in violation of agreements with other major nations. Their manipulation into the $4 trillion Forex market was totally unsuccessful. Japan and others are faced with increases in money and credit by the Fed in its efforts to again liquefy the US economy. Any attempt to fight another $2.5 trillion by foreign nations is going to be futile. The currencies of almost every nation will rise and there is little they can do about it. The US dollar has been abandoned in an effort to save an American economy that is in serious trouble. The currency devaluations will come, but will be unsuccessful. Russia is an exception and has thus far failed to use stimulus to weaken its rouble. Every time the IMF tries to suppress gold prices with its gold sales, Russia is right there buying it up, which must infuriate the elitists in Europe and the US. Almost 2/3s of their economy’s growth loss has been due to drought and fires, but with close to $500 billion in foreign exchange, they have no trouble buying gold, which puts those reserves at close to 24 million ounces. It is an easy way to dump dollars.

     

    Over and over again we hear central banks worldwide announcing how they are going to defend their currencies in order to keep their exports inexpensive. We wonder when someone in Washington is going to catch on to what has been perpetually done to injure the US economy? Free trade, globalization, offshoring and outsourcing doesn’t work. It has cost 8 million American jobs over the past 12 years and lowered wages from $30.00 an hour to $14.00 an hour, and caused a depression. British mercantilism has never worked except for those demeaning their currencies. The only answer for America is to impose stiff tariffs on foreign goods and services and junk NAFTA, CAFTA and the WTO. Just look at what China has done as an example. The yuan is undervalued by 40% and they could care less. They keep right on devaluing their currency and then complain about the loss in the value of the dollar and US Treasuries they buy as a result of currency manipulation. If the US is ever to survive economically they have to put an end to criminal devaluations.

  2. Gold has the Forex currencies in a panic attack mode. The recent upward prices in gold shows how weak the currencies are under the mantle of the new world order. As a trader, I am wondering what are the Rothchild's thinking? One currency means bye bye forex. Is that true?
  3. Price is an indicator but it repaints too much

     

    hmm, I agree. So here is an indicator that goes 'nicely' with the repainting indicator price. This indicator never repaint.

     

    #property copyright "SpanishOpenLine"

    #property link "[email protected]"

     

    #property indicator_chart_window

    #property indicator_buffers 1

    #property indicator_color1 Blue

     

    double g_ibuf_76[];

    extern int TimeZoneOfData = 0;

     

    int init() {

    SetIndexStyle(0, DRAW_LINE);

    SetIndexBuffer(0, g_ibuf_76);

    SetIndexLabel(0, "Open");

    SetIndexEmptyValue(0, 0.0);

    return (0);

    }

     

    int deinit() {

    return (0);

    }

     

    int start() {

    int li_0 = IndicatorCounted();

    if (li_0 > 0) li_0--;

    int li_4 = Bars - li_0;

    DailyOpen(0, li_4);

    return (0);

    }

     

    int DailyOpen(int ai_0, int ai_4) {

    int li_8 = 3600 * TimeZoneOfData;

    double ld_12 = 30.0 / Period();

    bool li_20 = TRUE;

    ai_4 = MathMin(Bars - 20.0 * ld_12 - 1.0, ai_4);

    for (int li_24 = ai_4; li_24 >= ai_0; li_24--) {

    g_ibuf_76[li_24] = 0;

    if (li_20) {

    if (TimeDay(Time[li_24] - li_8) != TimeDay(Time[li_24 + 1] - li_8)) {

    g_ibuf_76[li_24] = Open[li_24];

    g_ibuf_76[li_24 + 1] = 0;

    } else g_ibuf_76[li_24] = g_ibuf_76[li_24 + 1];

    }

    }

    return (0);

    }

  4. Indicators will NEVER predict price. Indicators will ALWAYS LAG price. Because indicators USE PRICE to plot on a chart. So indicators use PAST price. Think about it.

     

    By the same logic, Price is a lagging indicator. Why? Because, you never can catch the price while on the zone of now. (Well, you can sometimes by gambling). There is in that zone a price movement 15-20 pips on the broker side at entry and exit; where a lagging or leading indicator (classification which I consider a non-sense) is needed to indicate within a particular forex system where the next movement of price going to be. To be able to know if that zone has been used or exhausted.

     

    Price itself isn't an indicator. It is an object which you ride with it or would leave you standing.

  5. A priest, a doctor, and an engineer were waiting one morning for a particularly slow group of golfers.

     

    Engineer: What's with these guys? We must have been waiting for 15 minutes!

     

    Doctor: I don't know but I've never seen such ineptitude!

     

    Priest: Hey, here comes the greenskeeper. Let's have a word with him.

     

    Priest: Hi George. Say George, what's with that group ahead of us? They're rather slow aren't they?

     

    George: Oh yes. That's a group of blind fire fighters. They lost their sight while saving our club house last year. So we let them play here anytime free of charge!

     

    (silence)

     

    Priest: That's so sad. I think I will say a special prayer for them tonight.

     

    Doctor: Good idea. And I'm going to contact my ophthalmologist buddy and see if there's anything he can do for them.

     

    Engineer: Why can't these guys play at night?

  6. An important detail many times that is fail to noticed is to set a default of your preferable Currency, Size of lot and its deviation.

    That is, for all purpose; if you change currency trading and Size and no want the last used to be your entry by mistake.

     

    Metatrader Tools, Option, Trade, change last used to default and input your values.

  7. Thanks for your sharing (2) :D

     

    You are welcome!

     

    A friend sent me this nice indicator originally called Bluejay's lines

     

    #property indicator_chart_window

     

    extern double StartPrice = 0.0;

    extern int NumLines = 2;

    extern int Spacing = 25;

    extern string AboveBelow = "AB";

    extern color LineColor = Gray;

    extern int LineWidth = 1;

    extern int LineStyle = 0;

    extern string TimeFrames = "M1, M5, M15, M30, H1, H4, D1, W1, MN";

    string gs_120;

     

    int init() {

    int li_0 = 0;

    string ls_4 = NumberToStr(StartPrice, "2.5") + NumberToStr(NumLines, "3") + NumberToStr(Spacing, "4.1") + AboveBelow + TimeToStr(TimeLocal(), TIME_SECONDS);

    for (int li_12 = 0; li_12 < StringLen(ls_4); li_12++) li_0 += li_12 * StringGetChar(ls_4, li_12);

    gs_120 = "SpacedLines-" + li_0;

    IndicatorShortName(gs_120);

    del_obj();

    plot_obj();

    return (0);

    }

     

    int deinit() {

    del_obj();

    return (0);

    }

     

    int start() {

    return (0);

    }

     

    int MathSign(double ad_0) {

    if (ad_0 > 0.0) return (1);

    if (ad_0 < 0.0) return (-1);

    return (0);

    }

     

    double MathFix(double ad_0, int ai_8) {

    return (MathRound(ad_0 * MathPow(10, ai_8) + 0.0 * MathSign(ad_0)) / MathPow(10, ai_8));

    }

     

    void plot_obj() {

    double ld_4;

    double ld_12;

    string l_name_32;

    TimeFrames = StringUpper(TimeFrames) + ",";

    int li_0 = 0;

    if (StringFind(TimeFrames, "M1,") >= 0) li_0++;

    if (StringFind(TimeFrames, "M5,") >= 0) li_0 += 2;

    if (StringFind(TimeFrames, "M15,") >= 0) li_0 += 4;

    if (StringFind(TimeFrames, "M30,") >= 0) li_0 += 8;

    if (StringFind(TimeFrames, "H1,") >= 0) li_0 += 16;

    if (StringFind(TimeFrames, "H4,") >= 0) li_0 += 32;

    if (StringFind(TimeFrames, "D1,") >= 0) li_0 += 64;

    if (StringFind(TimeFrames, "W1,") >= 0) li_0 += 128;

    if (StringFind(TimeFrames, "MN,") >= 0) li_0 += 256;

    if (Digits >= 4) {

    ld_4 = 0.0001;

    ld_12 = MathFix(Close[0], 2);

    } else {

    ld_4 = 0.01;

    ld_12 = MathFix(Close[0], 0);

    }

    if (StartPrice > 0.0) ld_12 = StartPrice;

    AboveBelow = StringUpper(AboveBelow);

    int li_20 = 0;

    int li_24 = 0;

    if (AboveBelow == "A") {

    li_20 = -1;

    li_24 = NumLines - 2;

    } else {

    if (AboveBelow == "B") {

    li_20 = (-NumLines) + 2;

    li_24 = 1;

    } else {

    if (AboveBelow == "AB") {

    li_20 = (-NumLines) + 1;

    li_24 = NumLines - 1;

    }

    }

    }

    for (int li_28 = li_20; li_28 <= li_24; li_28++) {

    l_name_32 = gs_120 + "-" + li_28;

    ObjectCreate(l_name_32, OBJ_HLINE, 0, 0, ld_12 + Spacing * ld_4 * li_28);

    ObjectSet(l_name_32, OBJPROP_COLOR, LineColor);

    ObjectSet(l_name_32, OBJPROP_WIDTH, LineWidth);

    ObjectSet(l_name_32, OBJPROP_STYLE, LineStyle);

    ObjectSet(l_name_32, OBJPROP_TIMEFRAMES, li_0);

    }

    }

     

    void del_obj() {

    string l_name_4;

    int li_0 = 0;

    while (li_0 < ObjectsTotal()) {

    l_name_4 = ObjectName(li_0);

    if (StringSubstr(l_name_4, 0, StringLen(gs_120)) == gs_120) ObjectDelete(l_name_4);

    else li_0++;

    }

    }

     

    string StringUpper(string as_0) {

    int li_36;

    string ls_ret_8 = "";

    string ls_16 = "abcdefghijklmnopqrstuvwxyz";

    string ls_24 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

    for (int li_32 = 0; li_32 < StringLen(as_0); li_32++) {

    li_36 = StringFind(ls_16, StringSubstr(as_0, li_32, 1), 0);

    if (li_36 >= 0) ls_ret_8 = ls_ret_8 + StringSubstr(ls_24, li_36, 1);

    else ls_ret_8 = ls_ret_8 + StringSubstr(as_0, li_32, 1);

    }

    return (ls_ret_8);

    }

     

    string NumberToStr(double ad_0, string as_8) {

    string ls_36;

    bool li_68;

    bool li_72;

    bool li_76;

    bool li_80;

    bool li_84;

    bool li_88;

    bool li_92;

    string ls_108;

    bool li_116;

    bool li_120;

    string ls_124;

    string ls_132;

    int l_str_len_144;

    as_8 = StringUpper(as_8);

    int li_16 = 0;

    int li_20 = StringFind(as_8, ".", 0);

    if (li_20 < 0) {

    li_20 = StringLen(as_8);

    li_16 = 1;

    }

    int li_24 = 0;

    int li_28 = 0;

    for (int li_32 = 0; li_32 < li_20; li_32++) {

    ls_36 = StringSubstr(as_8, li_32, 1);

    if (ls_36 >= "0" && ls_36 <= "9") li_24 = 10 * li_24 + StrToInteger(ls_36);

    }

    if (li_16 == 0) {

    for (li_32 = li_20 + 1; li_32 <= StringLen(as_8); li_32++) {

    ls_36 = StringSubstr(as_8, li_32, 1);

    if (ls_36 >= "0" && ls_36 <= "9") li_28 = 10 * li_28 + StrToInteger(ls_36);

    }

    }

    li_28 = MathMin(li_28, 7);

    if (li_16 == 1) {

    for (li_32 = 0; li_32 < StringLen(as_8); li_32++) {

    ls_36 = StringSubstr(as_8, li_32, 1);

    if (ls_36 >= "0" && ls_36 <= "9") {

    li_20 = li_32;

    break;

    }

    }

    }

    string ls_44 = "";

    if (StringFind(as_8, "$", 0) >= 0) ls_44 = "$";

    if (StringFind(as_8, "£", 0) >= 0) ls_44 = "£";

    if (StringFind(as_8, "€", 0) >= 0) ls_44 = "€";

    if (StringFind(as_8, "¥", 0) >= 0) ls_44 = "¥";

    string ls_52 = "";

    string ls_60 = "";

    if (StringFind(as_8, "+", 0) >= 0 && StringFind(as_8, "+", 0) < li_20) {

    ls_52 = " ";

    if (ad_0 > 0.0) ls_52 = "+";

    if (ad_0 < 0.0) ls_52 = "-";

    }

    if (StringFind(as_8, "-", 0) >= 0 && StringFind(as_8, "-", 0) < li_20) {

    if (ad_0 < 0.0) ls_52 = "-";

    else ls_52 = " ";

    }

    if (StringFind(as_8, "-", 0) >= 0 && StringFind(as_8, "-", 0) > li_20) {

    if (ad_0 < 0.0) ls_60 = "-";

    else ls_60 = " ";

    }

    if (StringFind(as_8, "(", 0) >= 0 || StringFind(as_8, ")", 0) >= 0) {

    ls_52 = " ";

    ls_60 = " ";

    if (ad_0 < 0.0) {

    ls_52 = "(";

    ls_60 = ")";

    }

    }

    if (StringFind(as_8, ",", 0) >= 0) li_68 = TRUE;

    else li_68 = FALSE;

    if (StringFind(as_8, "Z", 0) >= 0) li_72 = TRUE;

    else li_72 = FALSE;

    if (StringFind(as_8, "B", 0) >= 0) li_76 = TRUE;

    else li_76 = FALSE;

    if (StringFind(as_8, "R", 0) >= 0) li_80 = TRUE;

    else li_80 = FALSE;

    if (StringFind(as_8, "*", 0) >= 0) li_84 = TRUE;

    else li_84 = FALSE;

    if (StringFind(as_8, "L", 0) >= 0) li_88 = TRUE;

    else li_88 = FALSE;

    if (StringFind(as_8, ";", 0) >= 0) li_92 = TRUE;

    else li_92 = FALSE;

    if (li_80) ad_0 = MathFix(ad_0, li_28);

    string ls_ret_96 = ad_0;

    int l_count_104 = 0;

    for (li_32 = 0; li_32 < StringLen(ls_ret_96); li_32++) {

    ls_36 = StringSubstr(ls_ret_96, li_32, 1);

    if (ls_36 >= "0" && ls_36 <= "9") l_count_104++;

    if (ls_36 == ".") break;

    }

    if (li_72) ls_108 = "0";

    else ls_108 = " ";

    if (ad_0 < 0.0) ls_ret_96 = "-" + StringRepeat(ls_108, li_24 - l_count_104) + StringSubstr(ls_ret_96, 1, StringLen(ls_ret_96) - 1);

    else ls_ret_96 = StringRepeat(ls_108, li_24 - l_count_104) + StringSubstr(ls_ret_96, 0, StringLen(ls_ret_96));

    ls_ret_96 = StringSubstr(ls_ret_96, StringLen(ls_ret_96) - 9 - li_24, li_24 + 1 + li_28 - li_16);

    if (li_68) {

    li_116 = FALSE;

    li_120 = FALSE;

    ls_124 = "";

    ls_132 = "";

    for (li_32 = 0; li_32 < StringLen(ls_ret_96); li_32++) {

    ls_36 = StringSubstr(ls_ret_96, li_32, 1);

    if (ls_36 == ".") li_120 = TRUE;

    if (!li_120 && li_24 - li_32 == 3 || li_24 - li_32 == 6 || li_24 - li_32 == 9) {

    if (li_116) ls_124 = ls_124 + ",";

    else ls_124 = ls_124 + " ";

    }

    ls_124 = ls_124 + ls_36;

    if (ls_36 >= "0" && ls_36 <= "9") li_116 = TRUE;

    }

    ls_ret_96 = ls_124;

    }

    ls_ret_96 = ls_44 + ls_52 + ls_ret_96 + ls_60;

    ls_124 = "";

    ls_132 = "";

    bool li_140 = TRUE;

    for (li_32 = 0; li_32 < StringLen(ls_ret_96); li_32++) {

    ls_36 = StringSubstr(ls_ret_96, li_32, 1);

    if (ls_36 >= "0" && ls_36 <= "9") li_140 = FALSE;

    if ((ls_36 == " " && li_140) || (li_76 && ad_0 == 0.0)) ls_124 = ls_124 + " ";

    else ls_132 = ls_132 + ls_36;

    }

    ls_ret_96 = ls_124 + ls_132;

    if (li_84 && l_count_104 > li_24) ls_ret_96 = "*" + StringSubstr(ls_ret_96, 1, StringLen(ls_ret_96) - 1);

    if (li_88) {

    l_str_len_144 = StringLen(ls_ret_96);

    ls_ret_96 = StringLeftTrim(ls_ret_96);

    ls_ret_96 = ls_ret_96 + StringRepeat(" ", l_str_len_144 - StringLen(ls_ret_96));

    }

    if (li_92) {

    ls_124 = "";

    for (li_32 = 0; li_32 < StringLen(ls_ret_96); li_32++) {

    ls_36 = StringSubstr(ls_ret_96, li_32, 1);

    if (ls_36 == ".") ls_124 = ls_124 + ",";

    else {

    if (ls_36 == ",") ls_124 = ls_124 + ".";

    else ls_124 = ls_124 + ls_36;

    }

    }

    ls_ret_96 = ls_124;

    }

    return (ls_ret_96);

    }

     

    string StringLeftTrim(string as_0) {

    bool li_8 = TRUE;

    string ls_ret_12 = "";

    for (int li_20 = 0; li_20 < StringLen(as_0); li_20++) {

    if (StringSubstr(as_0, li_20, 1) != " " || !li_8) {

    ls_ret_12 = ls_ret_12 + StringSubstr(as_0, li_20, 1);

    li_8 = FALSE;

    }

    }

    return (ls_ret_12);

    }

     

    string StringRepeat(string as_0, int ai_8) {

    string ls_ret_12 = "";

    for (int l_count_20 = 0; l_count_20 < ai_8; l_count_20++) ls_ret_12 = ls_ret_12 + as_0;

    return (ls_ret_12);

    }

  8. A newly published IMF strategy document calls for the implementation of a global currency, called the “bancor”, to stabilise the international monetary system, while acknowledging that only a monumental shift toward acceptance of globalism will make it possible in the short term.

     

    The IMF blueprint, authored by Reza Moghadam, director of the IMF’s strategy, policy and review department, has stayed under the radar for three months.

     

    However, an article on the Financial Times blog alphaville, entitled IMF blueprint for a global currency – yes really, today highlights the document and the clear strategy of the global financial body.

  9. cUSTOM rECTANgLE

     

     

     

    #property copyright "Kalenzo"

    #property link "http://www.fxservice.eu"

     

    #property indicator_chart_window

     

    extern int candleShift = 11;

    extern string rectangleName = "REC1";

    extern int iPrice = 3;

    extern bool useColors = TRUE;

    extern color defaultColor = DodgerBlue;

    extern color upColor = Green;

    extern color dnColor = Red;

     

    int init() {

    return (0);

    }

     

    int deinit() {

    return (0);

    }

     

    int start() {

    ObjectDelete(rectangleName);

    ObjectCreate(rectangleName, OBJ_RECTANGLE, 0, Time[candleShift], getPrice(iPrice, candleShift), Time[0], getPrice(iPrice, 0));

    ObjectSet(rectangleName, OBJPROP_WIDTH, 2);

    if (useColors) {

    if (Close[candleShift] > Close[0]) ObjectSet(rectangleName, OBJPROP_COLOR, dnColor);

    else ObjectSet(rectangleName, OBJPROP_COLOR, upColor);

    } else ObjectSet(rectangleName, OBJPROP_COLOR, defaultColor);

    return (0);

    }

     

    double getPrice(int ai_0, int ai_4) {

    switch (ai_0) {

    case 0:

    return (Open[ai_4]);

    case 1:

    return (High[ai_4]);

    case 2:

    return (Low[ai_4]);

    case 3:

    return (Close[ai_4]);

    }

    return (Close[ai_4]);

    }

  10. My personal experience is a 10 pip target system is simply a nonsense; scalping for me are 30+ pips. It doesn't mean that you do not get out at 10 pips profit due to market conditions. A system that target 10 pips the result would be broke or dying of heart attack. However, if you insist in doing that go back for about a month and check the charts against you iindicators entry and exit setup looking for their flaw or weak point and your indicators strength. This should be done with pen and paper on hand. Write down, any information that you think is important. Maybe, you can accomplish that which is impossible for me. A 10 pip system. Last, 95% of the indicators and systems out there are useless if you do not know an inside of their performance. Then, after you have a nice system then comes the psychological aspect of you as a trader. In the end, if you do not give up. You will succeed.
  11. Hi Hagar if you like fibo here is another one; also you could put it as you default fibo, and choose any range with it.

     

     

    SquidsterFiboBreak

     

    #property indicator_chart_window

    #property indicator_buffers 3

    #property indicator_color1 Red

    #property indicator_color2 Aqua

    #property indicator_color3 Yellow

     

    extern int DisplayFiboDay = 0;

    double g_price_80;

    double g_price_88;

    int g_width_96 = 1;

    extern color colour = Crimson;

    int gi_104 = 2;

    double gda_108[13];

    double g_ibuf_112[];

    double gda_116[13];

    string gsa_120[13];

    double g_ibuf_124[];

    double g_ibuf_128[];

    double g_iopen_132;

    int gi_140;

    int g_count_144;

     

    int init() {

    SetIndexLabel(1, "High");

    SetIndexStyle(1, DRAW_HISTOGRAM);

    SetIndexBuffer(1, g_ibuf_124);

    SetIndexLabel(2, "Low");

    SetIndexStyle(2, DRAW_HISTOGRAM);

    SetIndexBuffer(2, g_ibuf_128);

    SetIndexStyle(0, DRAW_LINE);

    SetIndexBuffer(0, g_ibuf_112);

    gda_116[0] = -1.618;

    gda_116[1] = -1.382;

    gda_116[2] = -0.618;

    gda_116[3] = -0.382;

    gda_116[4] = 0.0;

    gda_116[5] = 0.382;

    gda_116[6] = 0.5;

    gda_116[7] = 0.618;

    gda_116[8] = 1.0;

    gda_116[9] = 1.382;

    gda_116[10] = 1.618;

    gda_116[11] = 2.382;

    gda_116[12] = 2.618;

    gsa_120[0] = "Swing T4";

    gsa_120[1] = "Swing T3";

    gsa_120[2] = "Swing T2";

    gsa_120[3] = "Swing T1";

    gsa_120[4] = "Swing Low";

    gsa_120[5] = "Swing Short";

    gsa_120[6] = "Swing Pivot";

    gsa_120[7] = "Swing Long";

    gsa_120[8] = "Swing High";

    gsa_120[9] = "Swing T1";

    gsa_120[10] = "Swing T2";

    gsa_120[11] = "Swing T3";

    gsa_120[12] = "Swing T4";

    return (0);

    }

     

    int deinit() {

    ObjectsDeleteAll(0, OBJ_FIBO);

    return (0);

    }

     

    int start() {

    int li_0;

    double l_ihigh_8;

    double l_ilow_16;

    double l_iopen_24;

    double l_iclose_32;

    double ld_40;

    double ld_48;

    double ld_56;

    double ld_64;

    double ld_72;

    double l_iopen_80;

    double l_iclose_88;

    double ld_96;

    double ld_unused_104;

    double ld_unused_112;

    double ld_120;

    g_iopen_132 = iOpen(Symbol(), PERIOD_D1, DisplayFiboDay);

    for (int li_4 = Bars - IndicatorCounted(); li_4 >= 0; li_4--) {

    if (TimeHour(iTime(NULL, 0, li_4)) != 0) {

    g_ibuf_124[li_4] = g_ibuf_124[li_4 + 1];

    g_ibuf_128[li_4] = g_ibuf_128[li_4 + 1];

    } else {

    li_0 = iBarShift(Symbol(), PERIOD_D1, Time[li_4]) + 1;

    l_ihigh_8 = iHigh(NULL, PERIOD_D1, li_0);

    l_ilow_16 = iLow(NULL, PERIOD_D1, li_0);

    l_iopen_24 = iOpen(NULL, PERIOD_D1, li_0);

    l_iclose_32 = iClose(NULL, PERIOD_D1, li_0);

    if (l_iclose_32 < l_iopen_24) ld_40 = l_ihigh_8 + 2.0 * l_ilow_16 + l_iclose_32;

    else {

    if (l_iclose_32 > l_iopen_24) ld_40 = 2.0 * l_ihigh_8 + l_ilow_16 + l_iclose_32;

    else

    if (l_iclose_32 == l_iopen_24) ld_40 = l_ihigh_8 + l_ilow_16 + 2.0 * l_iclose_32;

    }

    ld_48 = ld_40 / 2.0 - l_ilow_16;

    ld_56 = ld_40 / 2.0 - l_ihigh_8;

    ld_64 = ld_48;

    ld_72 = ld_56;

    l_iopen_80 = l_iopen_24;

    l_iclose_88 = l_iclose_32;

    if (l_iclose_88 < l_iopen_80) ld_96 = ld_64 + 2.0 * ld_72 + l_iclose_88;

    else {

    if (l_iclose_88 > l_iopen_80) ld_96 = 2.0 * ld_64 + ld_72 + l_iclose_88;

    else

    if (l_iclose_88 == l_iopen_80) ld_96 = ld_64 + ld_72 + 2.0 * l_iclose_88;

    }

    ld_unused_104 = g_ibuf_124[li_4];

    ld_unused_112 = g_ibuf_128[li_4];

    g_ibuf_124[li_4] = ld_96 / 2.0 - ld_72;

    g_ibuf_128[li_4] = ld_96 / 2.0 - ld_64;

    }

    }

    int l_datetime_128 = iTime(Symbol(), PERIOD_D1, DisplayFiboDay);

    for (li_4 = 0; li_4 < Bars; li_4++) {

    if (Time[li_4] < l_datetime_128) {

    g_price_80 = g_ibuf_128[li_4];

    g_price_88 = g_ibuf_124[li_4];

    ld_120 = g_price_88 - g_price_80;

    for (int li_132 = 0; li_132 < 13; li_132++) gda_108[li_132] = g_price_80 + ld_120 * gda_116[li_132];

    if (gda_108[5] < g_iopen_132 && gda_108[7] > g_iopen_132) break;

    }

    }

    if (li_4 == Bars) {

    Comment("Error! Day not found");

    return;

    }

    string ls_136 = StringSubstr(TimeToStr(Time[li_4]), 0, 10);

    gsa_120[6] = "Pivot";

    g_price_80 = g_ibuf_128[li_4];

    g_price_88 = g_ibuf_124[li_4];

    ld_120 = g_price_88 - g_price_80;

    for (li_132 = 0; li_132 < 13; li_132++) gda_108[li_132] = g_price_80 + ld_120 * gda_116[li_132];

    int l_shift_144 = iBarShift(NULL, 0, StrToTime(TimeToStr(l_datetime_128, TIME_DATE) + " 00:00"));

    ObjectDelete("fibo-alert");

    ObjectCreate("fibo-alert", OBJ_FIBO, 0, Time[l_shift_144], g_price_88, Time[l_shift_144], g_price_80);

    ObjectSet("fibo-alert", OBJPROP_COLOR, colour);

    ObjectSet("fibo-alert", OBJPROP_WIDTH, g_width_96);

    ObjectSet("fibo-alert", OBJPROP_STYLE, STYLE_DOT);

    ObjectSet("fibo-alert", OBJPROP_FIBOLEVELS, 13);

    ObjectSet("fibo-alert", OBJPROP_LEVELCOLOR, colour);

    ObjectSet("fibo-alert", OBJPROP_LEVELSTYLE, STYLE_SOLID);

    for (li_132 = 0; li_132 < 13; li_132++) {

    ObjectSet("fibo-alert", li_132 + 210, gda_116[li_132]);

    ObjectSetFiboDescription("fibo-alert", li_132, gsa_120[li_132] + " " + DoubleToStr(100.0 * gda_116[li_132], 1) + " " + DoubleToStr(gda_108[li_132], Digits));

    }

    if (Month() > 9) {

    ObjectsDeleteAll(0, OBJ_FIBO);

    Alert("This indicator has expired. Wrong signals will be given");

    }

    if (gi_140 != Time[0]) {

    if (Close[1] > gda_108[7] && Open[1] <= gda_108[7]) {

    g_count_144++;

    if (g_count_144 >= gi_104) {

    g_count_144 = 0;

    gi_140 = Time[0];

    }

    }

    if (Close[1] < gda_108[5] && Open[1] >= gda_108[5]) {

    g_count_144++;

    if (g_count_144 >= gi_104) {

    g_count_144 = 0;

    gi_140 = Time[0];

    }

    }

    }

    return (0);

    }

×
×
  • Create New...