Results 1 to 10 of 46

Thread: [Ask] Sidus Cross

Threaded View

  1. #1
    Member dingding will become famous soon enough dingding's Avatar
    Join Date
    May 2017
    Posts
    214
    Thanks
    92
    Thanked 65 Times in 51 Posts

    [Ask] Sidus Cross

    Spoiler Spoiler:
    #property indicator_chart_window
    #property indicator_buffers 4
    #property indicator_color1 Blue
    #property indicator_color2 Yellow
    #property indicator_color3 Blue
    #property indicator_color4 Yellow

    extern bool Alerts = TRUE;
    extern bool Tunnel_Alerts = FALSE;
    extern bool Email_Alerts = FALSE;
    double g_ibuf_88[];
    double g_ibuf_92[];
    double g_ibuf_96[];
    double g_ibuf_100[];
    bool gi_104 = FALSE;
    bool gi_108 = FALSE;
    bool gi_unused_112 = FALSE;
    extern int FasterLWMA = 2;
    extern int SlowerLWMA = 8;
    extern int FasterSidusEMA = 18;
    extern int SlowerSidusEMA = 28;
    int gi_132 = 0;
    int gi_136 = 0;

    int init() {
    SetIndexStyle(0, DRAW_ARROW, EMPTY);
    SetIndexArrow(0, SYMBOL_ARROWUP);
    SetIndexBuffer(0, g_ibuf_88);
    SetIndexStyle(1, DRAW_ARROW, EMPTY);
    SetIndexArrow(1, SYMBOL_ARROWDOWN);
    SetIndexBuffer(1, g_ibuf_92);
    SetIndexStyle(2, DRAW_ARROW, EMPTY);
    SetIndexArrow(2, 167);
    SetIndexBuffer(2, g_ibuf_96);
    SetIndexStyle(3, DRAW_ARROW, EMPTY);
    SetIndexArrow(3, 167);
    SetIndexBuffer(3, g_ibuf_100);
    return (0);
    }

    int deinit() {
    return (0);
    }

    int start() {
    int li_8;
    double l_irsi_12;
    double l_irsi_20;
    double l_icci_28;
    double l_ima_36;
    double l_ima_44;
    double l_ima_52;
    double l_ima_60;
    double l_ima_68;
    double l_ima_76;
    double l_ima_84;
    double l_ima_92;
    double l_ima_100;
    double l_ima_108;
    double l_ima_116;
    double l_ima_124;
    double ld_132;
    double ld_140;
    int li_148 = IndicatorCounted();
    if (li_148 < 0) return (-1);
    if (li_148 > 0) li_148--;
    int li_0 = Bars - li_148;
    for (int li_4 = 0; li_4 <= li_0; li_4++) {
    li_8 = li_4;
    ld_132 = 0;
    ld_140 = 0;
    for (li_8 = li_4; li_8 <= li_4 + 9; li_8++) ld_140 += MathAbs(High[li_8] - Low[li_8]);
    ld_132 = ld_140 / 10.0;
    l_ima_36 = iMA(NULL, 0, FasterLWMA, 0, MODE_LWMA, PRICE_CLOSE, li_4);
    l_ima_52 = iMA(NULL, 0, FasterLWMA, 0, MODE_LWMA, PRICE_CLOSE, li_4 + 1);
    l_ima_68 = iMA(NULL, 0, SlowerLWMA, 0, MODE_LWMA, PRICE_CLOSE, li_4 - 1);
    l_ima_44 = iMA(NULL, 0, SlowerLWMA, 0, MODE_LWMA, PRICE_CLOSE, li_4);
    l_ima_60 = iMA(NULL, 0, SlowerLWMA, 0, MODE_LWMA, PRICE_CLOSE, li_4 + 1);
    l_ima_76 = iMA(NULL, 0, SlowerLWMA, 0, FasterLWMA, PRICE_CLOSE, li_4 - 1);
    l_ima_84 = iMA(NULL, 0, FasterSidusEMA, 0, MODE_EMA, PRICE_CLOSE, li_4);
    l_ima_92 = iMA(NULL, 0, FasterSidusEMA, 0, MODE_EMA, PRICE_CLOSE, li_4 + 1);
    l_ima_100 = iMA(NULL, 0, FasterSidusEMA, 0, MODE_EMA, PRICE_CLOSE, li_4 - 1);
    l_ima_108 = iMA(NULL, 0, SlowerSidusEMA, 0, MODE_EMA, PRICE_CLOSE, li_4);
    l_ima_116 = iMA(NULL, 0, SlowerSidusEMA, 0, MODE_EMA, PRICE_CLOSE, li_4 + 1);
    l_ima_124 = iMA(NULL, 0, SlowerSidusEMA, 0, MODE_EMA, PRICE_CLOSE, li_4 - 1);
    l_irsi_12 = iRSI(NULL, 0, 21, PRICE_CLOSE, li_4);
    l_irsi_20 = iRSI(NULL, 0, 21, PRICE_CLOSE, li_4 + 1);
    l_icci_28 = iCCI(NULL, 0, 50, PRICE_CLOSE, li_4);
    if (l_ima_84 > l_ima_108 && l_ima_92 <= l_ima_116 && l_ima_100 > l_ima_124) {
    gi_108 = TRUE;
    gi_104 = FALSE;
    g_ibuf_96[li_4] = Low[li_4] - 1.0 * ld_132;
    if (li_4 <= 2 && Alerts && !gi_132 && Tunnel_Alerts) {
    gi_132 = TRUE;
    gi_136 = FALSE;
    Alert(Symbol(), " ", Period(), "M Sidus Tunnel UP ");
    if (Email_Alerts) SendMail("Sidus Tunnel UP " + Symbol(), "");
    }
    }
    if (l_ima_84 < l_ima_108 && l_ima_92 >= l_ima_116 && l_ima_100 < l_ima_124) {
    gi_104 = TRUE;
    gi_108 = FALSE;
    g_ibuf_100[li_4] = High[li_4] + 1.2 * ld_132;
    if (li_4 <= 2 && Alerts && !gi_136 && Tunnel_Alerts) {
    gi_132 = FALSE;
    gi_136 = TRUE;
    Alert(Symbol(), " ", Period(), "M Sidus Tunnel DOWN ");
    if (Email_Alerts) SendMail("Sidus Tunnel DOWN " + Symbol(), "");
    }
    }
    if ((l_ima_36 > l_ima_84 && l_ima_36 > l_ima_108) || (l_ima_44 > l_ima_84 && l_ima_44 > l_ima_108) && l_ima_52 <= l_ima_92 || l_ima_52 <= l_ima_116 && l_ima_60 <= l_ima_92 ||
    l_ima_60 <= l_ima_116 && gi_108) {
    gi_108 = FALSE;
    gi_104 = FALSE;
    gi_unused_112 = TRUE;
    g_ibuf_88[li_4] = Low[li_4] - 1.6 * ld_132;
    if (li_4 <= 2 && Alerts && !gi_132) {
    Alert(Symbol(), " ", Period(), "M Sidus BUY ");
    if (Email_Alerts) SendMail("Sidus BUY " + Symbol(), "");
    gi_132 = TRUE;
    gi_136 = FALSE;
    }
    }
    if ((l_ima_36 < l_ima_84 && l_ima_36 < l_ima_108) || (l_ima_44 < l_ima_84 && l_ima_44 < l_ima_108) && l_ima_52 >= l_ima_92 || l_ima_52 >= l_ima_116 && l_ima_60 >= l_ima_92 ||
    l_ima_60 >= l_ima_116 && gi_104) {
    gi_108 = FALSE;
    gi_104 = FALSE;
    gi_unused_112 = TRUE;
    g_ibuf_92[li_4] = High[li_4] + 1.2 * ld_132;
    if (li_4 <= 2 && Alerts && !gi_136) {
    Alert(Symbol(), " ", Period(), "M Sidus SELL ");
    if (Email_Alerts) SendMail("Sidus SELL " + Symbol(), "");
    gi_136 = TRUE;
    gi_132 = FALSE;
    }
    }
    }
    return (0);
    }


    coder, newbie asked. in the spoiler above is the coding of sidus cross that gives 2 signals in the form of arrows and boxes. my test pake simulator turned out to be a repaint arrow but it looks like a no box mark. [if not wrong box is indicator 3 and 4]. please help this newbi logic from indicator it is approximately which part bring up the box mark. can the calculations that bring up arrows [indicators 1 and 2] be deleted without disturbing the calculation of the emergence of the box marks. so thank you the masters are willing to help

    Though trading on financial markets involves high risk, it can still generate extra income in case you apply the right approach. By choosing a reliable broker such as InstaForex you get access to the international financial markets and open your way towards financial independence. You can sign up here.


  2. The Following 10 Users Say Thank You to dingding For This Useful Post:

    Alizahid (2020-10-20), bahi00 (2020-10-19), Boss12 (2020-10-19), CJ7 (2020-10-20), gagap (2018-02-28), Kanwal (2020-10-19), korong (2018-02-28), LOC (2020-10-20), MNA (2020-10-20), yajna (2018-02-28)

Posting Permissions

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

Currently Active UsersCurrently Active Users

There are currently users online. members and guests

Forex Forum India | Forex Community Place Statistics Forex Forum India Statistics

Most users ever online was .

Welcome to our newest member,

Threads:

Posts:

Member: