Select language
Balance replenishment ALIEBAY

REGISTER PARTICIPANTS Indicator Range Bars Mt4

Discussion in 'Technical Indicators MetaTrader 4' started by James Goldman, Nov 1, 2020.

Stage:
Recruitment of participants
Price:
45.00 USD
Participants:
0 of 5
Organizer:
James Goldman
  1. James Goldman

    James Goldman Moderator
    Staff Member Organizer

    Joined:
    Jun 15, 2020
    Threads:
    2,345
    Messages:
    2,346
    Likes Received:
    1
    Country:
    USA
    Range Bars

    #rangebars

    range-bars-logo-200x200-3309.png

    The robust charting solution that enables creating custom live range bar charts on the MetaTrader 4 trading platform.

    You can apply all of the standard and custom indicators and technical studies directly to the range bar charts and you can run EAs directly on these charts as well* (for details see text below the input summary).

    To create a range bar chart you need to attach the Range Bar indicator to a standard time frame (1 minute is recommended) and use the indicator's settings to generate a live custom chart that will be displayed on an offline chart of your choice. All of the available settings are described below:

    Bar type definition

    • Candle size (in pips for Forex pairs and in points for others).
    Display settings

    • Display on offline chart (M2, M3, M4, M6, M7, M8, M9 or M10).
    • Apply template to offline chart (name of the template to apply to the range bars chart)
    • Automatically open offline chart (true/false)
    • Build history for number of days.
    • Reset Open on each trading day.
    • Override start of trading day.
    • Re-calculate chart on history updates.
    • Minimum chart update interval (defined in milliseconds).
    ATR based bar size calculation

    • Enabled (true/false).
    • Daily ATR period.
    • Percentage of ATR to calculate candle size (high to low).
    Alerts and Info

    • Sound signal on new bar (true/false).
    • Only signal reversal bars (true/false).
    • Use Alert Window to display signal (true/false).
    • Sound file to play on bullish bar.
    • Sound file to play on bearish bar.
    • Color of High threshold indicator.
    • Color of Low threshold indicator.
    • Color of an inactive threshold indicator.
    * EAs can be used directly on the offline chart, however, a small tweak is required, so you need to have access to your EA source code. Below is an EA skeleton example that is capable of running directly on the offline chart:

    #property strict
    //+------------------------------------------------------------------+
    //| Expert initialization function |
    //+------------------------------------------------------------------+
    int OnInit()
    {
    // You need to initialize a time to call the OnTimer event.
    // It is used to call OnTick whenever the Bid price changes.
    // The check is made every 250 ms, which should be sufficient.

    EventSetMillisecondTimer(250);

    //---

    return(INIT_SUCCEEDED);
    }
    //+------------------------------------------------------------------+
    //| Expert deinitialization function |
    //+------------------------------------------------------------------+
    void OnDeinit(const int reason)
    {
    // Remember to destroy timer in the OnDeinit event.

    EventKillTimer();

    //---
    }
    //+------------------------------------------------------------------+
    //| Expert tick function |
    //+------------------------------------------------------------------+
    void OnTick()
    {
    // This is where all of your EA trading logic resides.
    // I just write to the log in this example...
    //
    Print("OnTick function call - bid = "+(string)Bid);
    }
    //+------------------------------------------------------------------+
    //| The OnTimer function is used to call OnTick() |
    //| whenever the Bid price changes. |
    //+------------------------------------------------------------------+
    void OnTimer()
    {
    RefreshRates();
    static double prevBid = 0;

    if(Bid != prevBid)
    {
    prevBid = Bid;
    OnTick();
    }
    //+------------------------------------------------------------------+

    range-bars-screen-6086.png range-bars-screen-7406.png range-bars-screen-4641.png range-bars-screen-2760.png range-bars-screen-7990.png

     

Share This Page

Select language
Balance replenishment ALIEBAY
  • Subscribe to new topics

    Subscribe
  • International online service AliEbay