Belkhayate's Timing Indicator

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Belkhayate's Timing Indicator

Postby Nikolay.Gekht » Tue Apr 20, 2010 2:47 pm

BELTIME.png


Download the indicator:
BELTIME.lua
(2.24 KiB) Downloaded 4056 times


Code: Select all
-- Indicator profile initialization routine
-- Defines indicator profile properties and indicator parameters
function Init()
    indicator:name("Belkayate timing indicator");
    indicator:description("");
    indicator:requiredSource(core.Bar);
    indicator:type(core.Oscillator);

    indicator.parameters:addInteger("N", "Number of bars", "No description", 5);
end

-- Indicator instance initialization routine
-- Processes indicator parameters and creates output streams
-- Parameters block
local N;

local first;
local source = nil;

-- Streams block
local O = nil;
local H = nil;
local L = nil;
local C = nil;

-- Routine
function Prepare()
    N = instance.parameters.N;
    source = instance.source;
    first = source:first() + N;

    local name = profile:id() .. "(" .. source:name() .. ", " .. N .. ")";
    instance:name(name);
    O = instance:addStream("O", core.Line, name .. ".O", "O", 0, first);
    H = instance:addStream("H", core.Line, name .. ".H", "H", 0, first);
    L = instance:addStream("L", core.Line, name .. ".L", "L", 0, first);
    C = instance:addStream("C", core.Line, name .. ".C", "C", 0, first);
    O:addLevel(8);
    O:addLevel(6);
    O:addLevel(0);
    O:addLevel(-6);
    O:addLevel(-8);
    instance:createCandleGroup("BT", "BT", O, H, L, C);
end

-- Indicator calculation routine
function Update(period)
    if period >= first then
        local range, sumhigh, sumlow, avg1, avg2;
        range = core.rangeTo(period, N);
        sumhigh = core.sum(source.high, range);
        sumlow = core.sum(source.low, range);
        avg1 = (sumhigh + sumlow) / (2 * N);
        avg2 = (sumhigh - sumlow) / (5 * N);

        O[period] = (source.open[period] - avg1) / avg2;
        H[period] = (source.high[period] - avg1) / avg2;
        L[period] = (source.low[period] - avg1) / avg2;
        C[period] = (source.close[period] - avg1) / avg2;
    end
end
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: Belkhayate's Timing Indicator

Postby TMos1124 » Tue Jun 19, 2012 4:23 pm

Can an alert be made for this indicator? (x > |8|....)
TMos1124
 
Posts: 14
Joined: Thu Apr 28, 2011 4:13 pm

Re: Belkhayate's Timing Indicator

Postby Apprentice » Wed Jun 20, 2012 1:40 am

Your request is added to the Development List.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Belkhayate's Timing Indicator

Postby Apprentice » Thu Jun 21, 2012 1:52 pm

BELTIME with Alert.png


I have made ​​the update of original indicator.
OB / OS levels can now be changed.
Audio, Email Alerts are now supported.

You can choose from 5 signals, OB1, OB2, OS1, OS2 and Zero Line Cross.
BELTIME with Alert.lua
(13.11 KiB) Downloaded 2258 times


Compatibility issue Fix. _Alert helper is not longer needed.
If you want to use the updated version,
please make sure to use latest version of TS.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Belkhayate's Timing Indicator

Postby TMos1124 » Thu Jun 21, 2012 5:39 pm

Is it possible to have this alert at the tick rather than the close of the candle?
TMos1124
 
Posts: 14
Joined: Thu Apr 28, 2011 4:13 pm

Re: Belkhayate's Timing Indicator

Postby cccornesss » Wed Jun 27, 2012 5:48 am

Thanks, amazing job and indicator!

Could it be possible to add another configurable line/level? I mean: another OB3 & OS3, with alert.

Thank you very much in advance ;)
cccornesss
 
Posts: 7
Joined: Wed Jun 27, 2012 5:44 am

Re: Belkhayate's Timing Indicator

Postby Apprentice » Thu Jun 28, 2012 1:16 am

Your request is added to the development list.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36258
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Re: Belkhayate's Timing Indicator

Postby cccornesss » Mon Jul 02, 2012 2:13 am

That was quick!!! Thank you very much :D
cccornesss
 
Posts: 7
Joined: Wed Jun 27, 2012 5:44 am

Re: Belkhayate's Timing Indicator

Postby londonfx » Mon Jul 02, 2012 3:30 pm

Please add Mt4 version. Thank you,
londonfx
 
Posts: 2
Joined: Mon Jun 25, 2012 3:22 am

Next

Return to Custom Indicators

Who is online

Users browsing this forum: No registered users and 17 guests