Ai đó có thể giúp tôi với mã này không. . . .
Results 1 to 5 of 5

Thread: Ai đó có thể giúp tôi với mã này không. . . .

  1. #1
    Xin chào,

    Ai đó có thể giúp tôi với điều này.

    Khi điều kiện được đáp ứng cho Cảnh báo bật lên, nó sẽ bật lên mỗi vài giây cho độ dài của thanh. Tôi chạy điều này trên một bảng xếp hạng giờ duy nhất nhưng nó giữ trên buộc cửa sổ bật lên.

    Ngoài ra, nếu tôi có thể dừng nó bật lên (vì vậy tôi chỉ khuyên sau) làm cảnh báo thiết lập lại vì vậy nếu nó được kích hoạt trong khoảng thời gian 3 thanh nếu điều kiện đi một lần nữa.

    Nếu bất cứ ai có thể giúp tôi đánh giá cao nó.

    Trân trọng
    Steve



    // ----------------------------------------------- -------------------
    //| My_First_Indior. Mq4 |
    //|
    http://www.forex-tsd.com|
    //p ----------------------------------------------- -------------------
    #property bản quyền Steve Dawson
    #property indior_separate_window
    #property indior_buffers hai
    #property indior_color1 Red
    #property indior_color2 Màu xanh lục
    //- bộ đệm
    double ExtMapBuffer1 [];
    double ExtMapBuffer2 [];
    bool buf_alert_already_triggered;
    //p ----------------------------------------------- -------------------
    //| Chức năng khởi tạo chỉ báo tùy chỉnh |
    //p ----------------------------------------------- -------------------
    int init ()

    //- chỉ báo
    SetIndexStyle (0, DRAW_HISTOGRAM, EMPTY, 3);
    SetIndexBuffer (0, ExtMapBuffer1);
    SetIndexStyle (1, DRAW_HISTOGRAM, EMPTY, 3);
    SetIndexBuffer (1, ExtMapBuffer2);
    series short_name = MAX - Biểu đồ OBOS với Cảnh báo! ;
    IndiorShortName (short_name);
    sản lượng (1);

    //p ----------------------------------------------- -------------------
    //| Chức năng khởi tạo chỉ số Custor |
    //p ----------------------------------------------- -------------------
    int deinit ()

    //-
    //-
    return (0);

    //p ----------------------------------------------- -------------------
    //| Phân phối chỉ số tùy chỉnh phục vụ |
    // ----------------------------------------------- -------------------
    int bắt đầu ()
    (ExtMapBuffer2 [1] == 1)) (buf_alert_already_triggered == 0))

    Cảnh báo (Có thể BÁN cho, Biểu tượng (), trên, Giai đoạn (), biểu đồ!);
    buf_alert_already_triggered = 1;
    khác

    buf_alert_already_triggered = 0;

    //-
    return (0);

    // ----------------------------------------------- -------------------

  2. #2
    Thành phần này đặt nó trở lại 0} khác buf_alert_already_triggered = 0; youl cần phải thay đổi

  3. #3
    Cảm ơn Tom nó hoạt động tốt. Một câu hỏi nữa nếu bạn không phiền. Đó là cảnh báo được giả định được kích hoạt những gì sẽ xảy ra nếu trong nói 10 thanh? Biến có được đặt lại trên thanh khác hoặc cảnh báo không hoạt động cho đến khi tôi khởi động lại nền tảng không? Cảm ơn Steve

  4. #4
    Youl cần một số phương pháp thiết lập nó trở lại 0

  5. #5
    #property indior_chart_window #property indior_buffers 8 #property indior_color1 Magenta #property indior_color2 Aqua #property indior_color3 Magenta #property indior_color4 Aqua #property indior_color5 Magenta #property indior_color6 Aqua #property indior_color7 Magenta #property indior_color8 Aqua/- thông số đầu vào extern double stoch_period = 9 ; extern đôi stoch_max = 53; extern đôi stoch_min = 47; extern gấp đôi atr_current_norm_factor = 0.435; extern double atr_before_norm_factor = 1.5; extern đôi atr_period = 7; extern int atr_before_step = 1; extern int NumBars = 10000;/Nếu bạn muốn hiển thị TẤT CẢ các giá trị chỉ báo, hãy đặt giá trị này thành 0 - sẽ sử dụng nhiều bộ nhớ hơn vì nguyên nhân/- bộ đệm double sell_stop_dot_buf []; double buy_stop_dot_buf []; double sell_stop_line_buf []; double buy_stop_line_buf []; double sell_signal_buf []; double buy_signal_buf []; double down_buf []; double up_buf []; int init () SetIndexStyle (0, DRAW_ARROW); SetIndexArrow (0,115); SetIndexBuffer (0, sell_stop_dot_buf); SetIndexLabel (0, sell_stop_dot); SetIndexEmptyValue (0, EMPTY_VALUE); SetIndexStyle (1, DRAW_ARROW); SetIndexArrow (1,115); SetIndexBuffer (1, buy_stop_dot_buf); SetIndexLabel (1, buy_stop_dot); SetIndexEmptyValue (1, EMPTY_VALUE); SetIndexStyle (2, DRAW_LINE); SetIndexBuffer (2, sell_stop_line_buf); SetIndexLabel (2, sell_stop_line); SetIndexEmptyValue (2, EMPTY_VALUE); SetIndexStyle (3, DRAW_LINE); SetIndexBuffer (3, buy_stop_line_buf); SetIndexLabel (3, buy_stop_line); SetIndexEmptyValue (3, EMPTY_VALUE); SetIndexStyle (4, DRAW_ARROW); SetIndexArrow (4,108); SetIndexBuffer (4, sell_signal_buf); SetIndexLabel (4, sell_signal); SetIndexEmptyValue (4, EMPTY_VALUE); SetIndexStyle (5, DRAW_ARROW); SetIndexArrow (5,108); SetIndexBuffer (5, buy_signal_buf); SetIndexLabel (5, buy_signal); SetIndexEmptyValue (5, EMPTY_VALUE); SetIndexStyle (6, DRAW_HISTOGRAM); SetIndexBuffer (6, down_buf); SetIndexLabel (6, down_trend); SetIndexStyle (7, DRAW_HISTOGRAM); SetIndexBuffer (7, up_buf); SetIndexLabel (7, up_trend); int Begin () double stoch_current, atr_current_normalised, atr_before_normalised; double value3, value4, value5, val1, val2, close_diff, r; int flag1, flag2;/flags = 1 Nếu cặp giảm xuống nhanh. Stoch dưới stoch_min và diff trong Closes vượt quá atr_current_normalised./flags = hai khi cặp tăng lên nhanh chóng. Stoch là trên stoch_max và khác biệt trong Closes vượt quá atr_current_normalised. Nếu (NumBars == 0) int thay đổi = Bars - MathMax (stoch_period, atr_period); else change = MathMax (Bars, NumBars) - MathMax (stoch_period, atr_period); trong khi (shiftgt; = 0)

Quyền đăng bài

  • Bạn không thể đăng bài viết mới
  • Bạn không thể đăng trả lời
  • Bạn không thể đăng tệp đính kèm
  • Bạn không thể chỉnh sửa bài đăng của bạn
  •  
Chính sách Cookie
Chính sách Cookie: Website forexibroker sử dụng cookies và khi tiếp tục sử dụng website bạn chấp thuận với điều này. Để có thêm thông tin, vui lòng đọc 'Thông tin Cookie'.