Up/Down Percentage

Here you can post and download custom indicators written in JavaScript.

Moderator: admin

Up/Down Percentage

Postby Alexander.Gettinger » Wed May 02, 2018 2:52 pm

Formulas:
UP = MVA(UpF) with [Length] number of periods,
DN = MVA(DnF) with [Length] number of periods, where
UpF = 1, if Price[i]>Price[i-1], else UpF[i] = 0,
DnF = 1, if Price[i]<Price[i-1], else DnF[i] = 0.

UDP.PNG


Download:
UDP_JS.jsl
(2.27 KiB) Downloaded 587 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Return to JavaScript Indicators and Strategies

Who is online

Users browsing this forum: No registered users and 3 guests