Page 1 of 2

Vortex Indicator

PostPosted: Tue Feb 02, 2010 6:05 pm
by TonyMod
VORTEX INDICATOR

Posting a new Vortex Indicator. 'kingscorpion' has requested this indicator to be developed for marketscope, and short description was inserted here from his original request.

Information on this indicator can be found here:http://www.traders.com/Reprints/PDF_reprints/VFX_VORTEX.PDF

vortex.png
Screenshot Of 'Vortex Indicator' from MarketScope


Vortex Indicator
by kingscorpion

Vortex, developed by Etienne Botes & Douglas Siepman of http://www.VortexFund.com, uses the relationship between today's high and yesterday's low for VM+ (similar to DMI+) and today's low and yesterday's high for VM- (similar to DMI-). The indicator plots only two line.

The first calculation is for the positive trending vortex movement VM+:
= ABS(Today's High - Yesterday's Low)

Next, calculate the negative trending vortex movement –VM. The formula is:
=ABS(Today's Low - Yesterday's High)

A 14-period sum of both VM+ and VM- is calculated.

Next, we calculate the true range (TR) and need to get the sum of the last 14 periods’ true range.

Finally, we need to calculate the ratio of each 14 period VM+ and 14 period VM- to the sum of the last 14 days’ daily true ranges.

And now the two ratios are drawn for the Vortex Indicator.

-kingscorpion


Code: Select all
-- Indicator profile initialization routine
function Init()
    indicator:name("The Vortext Indicator");
    indicator:description("The indicator was described in Jan, 10 issue of the 'Stock and Commodites' Magazin");
    indicator:requiredSource(core.Bar);
    indicator:type(core.Oscillator);

    indicator.parameters:addInteger("N", "Length of the vortex", "No description", 14);
    indicator.parameters:addColor("VIP_color", "Color of VI+", "Color of VI+", core.rgb(0, 255, 0));
    indicator.parameters:addColor("VIM_color", "Color of VI-", "Color of VI-", core.rgb(255, 0, 0));
end

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

local first;
local source = nil;

-- Streams block
local VIP = nil;
local VIM = nil;
local iVIP = nil;
local iVIN = nil;
local iATR = nil;

-- Routine
function Prepare()
    N = instance.parameters.N;
    source = instance.source;
    iATR = core.indicators:create("ATR", instance.source, 1);
 
    first = iATR.DATA:first() + N;

    local name = profile:id() .. "(" .. source:name() .. ", " .. N .. ")";
    instance:name(name);
    VIP = instance:addStream("VIP", core.Line, name .. ".VI+", "VI+", instance.parameters.VIP_color, first);
    VIM = instance:addStream("VIM", core.Line, name .. ".VI-", "VI-", instance.parameters.VIM_color, first);

    iVIP = instance:addInternalStream(1, 0);
    iVIM = instance:addInternalStream(1, 0);
end

-- Indicator calculation routine
function Update(period, mode)
    iATR:update(mode);
    if period >= 1 then
        iVIP[period] = math.abs(source.high[period] - source.low[period - 1]);
        iVIM[period] = math.abs(source.low[period] - source.high[period - 1]);
    end
    if period >= first then
        local svip, svim, satr;
        local range;
        range = core.rangeTo(period, N);
        svip = core.sum(iVIP, range);
        svim = core.sum(iVIM, range);
        satr = core.sum(iATR.DATA, range);

        VIP[period] = svip / satr * 100;
        VIM[period] = svim / satr * 100;
    end
end

VORTEX.lua
Download Vortex Indicator in .Lua
(2.08 KiB) Downloaded 2811 times

MT4/MQ4 Version.
viewtopic.php?f=38&t=64350

Re: Vortex Indicator

PostPosted: Tue Sep 13, 2011 12:59 pm
by jtatalov
Can someone please develop a signal with sound for this indicator, thank you in advance


Jason

Re: Vortex Indicator

PostPosted: Thu Sep 15, 2011 12:17 pm
by Apprentice
Requested can be found here.
viewtopic.php?f=31&t=6571

Re: Vortex Indicator

PostPosted: Wed Jan 04, 2012 4:09 pm
by zmender
EURUSD H4 (11-13-2017 1042).png

Vortex Difference indicator. Plots the VI+ - VI-
VORTEX_Difference.lua
(1.89 KiB) Downloaded 1055 times

Re: Vortex Indicator

PostPosted: Mon Apr 30, 2012 4:56 am
by Apprentice
MTF VORTEX.png

MTF VORTEX.lua
(9.51 KiB) Downloaded 1088 times

MTF_MCP_Vortex_List.png

MTF_MCP_Vortex_List.lua
(9.61 KiB) Downloaded 1019 times

MQ4/MT4 version.
viewtopic.php?f=38&t=64349
Vortex Heat Map.png

Vortex Heat Map.lua
(8.09 KiB) Downloaded 1046 times

MQ4/MT4 version.
viewtopic.php?f=38&t=64362

Re: Vortex Indicator

PostPosted: Mon Apr 30, 2012 6:13 am
by jackfx09
nicely done gentlemen, thank you!


In reference to heat maps, is it possible to create a Multi Currency Pair, MTF heatmap?

Thanks again for your efforts, nice work!


sjc

Re: Vortex Indicator

PostPosted: Tue May 01, 2012 8:24 am
by Apprentice
Yes it is possible

Re: Vortex Indicator

PostPosted: Fri Oct 12, 2012 3:12 am
by Apprentice
MTF MCP Vortex Heat Map.png

MTF MCP Vortex Heat Map.lua
(8.6 KiB) Downloaded 1024 times

Re: Vortex Indicator

PostPosted: Fri Apr 12, 2013 3:48 am
by Yodian
Can you please make the MTF_MCP_Vortex_List to display the actual values (in green for + or Red for -)? This will make it much more usefull to understand the strength of the Vortex.

Thank you in advance!

Re: Vortex Indicator

PostPosted: Tue Apr 16, 2013 1:36 pm
by Apprentice
MTF MCP VORTEX LIST.png

Indicator will show +/- Vortex Values for all currency pairs available, for all time frame selected.
MTF MCP VORTEX LIST.lua
(9.11 KiB) Downloaded 961 times