Vortex 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

Vortex Indicator

Postby TonyMod » Tue Feb 02, 2010 6:05 pm

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 2803 times

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

"TonyMod"
(FXCodeBase.com Forum Moderator)
TonyMod
FXCodeBase: Site Admin
 
Posts: 70
Joined: Wed Oct 21, 2009 1:57 pm
Location: New Jersey

Re: Vortex Indicator

Postby jtatalov » Tue Sep 13, 2011 12:59 pm

Can someone please develop a signal with sound for this indicator, thank you in advance


Jason
jtatalov
 
Posts: 42
Joined: Sat Aug 06, 2011 3:28 am


Re: Vortex Indicator

Postby zmender » Wed Jan 04, 2012 4:09 pm

EURUSD H4 (11-13-2017 1042).png

Vortex Difference indicator. Plots the VI+ - VI-
VORTEX_Difference.lua
(1.89 KiB) Downloaded 1050 times
zmender
 
Posts: 43
Joined: Thu Nov 10, 2011 11:00 pm

Re: Vortex Indicator

Postby Apprentice » Mon Apr 30, 2012 4:56 am

MTF VORTEX.png

MTF VORTEX.lua
(9.51 KiB) Downloaded 1084 times

MTF_MCP_Vortex_List.png

MTF_MCP_Vortex_List.lua
(9.61 KiB) Downloaded 1015 times

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

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

MQ4/MT4 version.
viewtopic.php?f=38&t=64362
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Vortex Indicator

Postby jackfx09 » Mon Apr 30, 2012 6:13 am

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
jackfx09
 
Posts: 53
Joined: Wed Aug 17, 2011 1:03 pm



Re: Vortex Indicator

Postby Yodian » Fri Apr 12, 2013 3:48 am

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!
Yodian
 
Posts: 20
Joined: Fri Apr 12, 2013 3:40 am

Re: Vortex Indicator

Postby Apprentice » Tue Apr 16, 2013 1:36 pm

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 956 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Next

Return to Custom Indicators

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 49 guests