Average speed

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

Average speed

Postby Alexander.Gettinger » Thu Feb 28, 2013 6:30 pm

AverageSpeed.PNG

This indicator is a ported MQL5 indicators from http://www.mql5.com/en/code/1544.

The Average Speed indicator measures how quickly the price is changing per unit of time (typically per second), adjusted by the instrument’s pip size. It then calculates the average of these speed values over a specified number of periods.

This helps traders understand how active or volatile the market is over time.

Formula
Speed between two ticks:

Speed[period] = |Price[period] - Price[period - 1]| / (pipSize × Δt)
Where Δt is the time difference between the two ticks.

Average Speed over N periods (e.g., 3):

AS[period] = average(Speed[period - N + 1] to Speed[period])
The indicator displays the average speed in green if it's increasing and red if it's decreasing.

Download:
Average_Speed.lua
(1.51 KiB) Downloaded 1072 times

Average_Speed with Alert.lua
(21.81 KiB) Downloaded 444 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Average speed

Postby Apprentice » Mon May 01, 2017 6:46 am

Indicator was revised and updated.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 38770
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Average speed

Postby Apprentice » Mon Aug 05, 2024 3:10 am

Average_Speed with Alert.lua added.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 38770
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Average speed

Postby mayk01 » Tue Aug 06, 2024 4:12 pm

Hi Apprentice,
That's great. :) Looks like it's working fine.
It helps very well in changing fractal situations.

Regards,
M.
mayk01
 
Posts: 48
Joined: Tue Nov 14, 2017 3:38 pm

Re: Average speed

Postby mayk01 » Thu Mar 20, 2025 1:24 am

Hi Apprentice,
Can it be converted with a new name so that it is two-sided? I mean so that the direction of the speed coincides with the direction of the price? Also is it possible to add a signal arrow where it has crossed or touched the set alarm?

Regards,
M.
mayk01
 
Posts: 48
Joined: Tue Nov 14, 2017 3:38 pm

Re: Average speed

Postby Apprentice » Fri Mar 21, 2025 6:02 am

We have added your request to the development list.
Development reference 214
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 38770
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Average speed

Postby Apprentice » Wed Mar 26, 2025 1:48 pm

EURUSD D1 (03-26-2025 1944).png


Directional Separation (Up vs Down Candles):
Unlike the basic Average Speed indicator which calculates the overall price movement speed regardless of direction, Directional Average Speed separates the speed of up candles and down candles into two distinct streams. This allows you to see how fast price moves up versus how fast it moves down.

Two Outputs vs One:

Average Speed has a single output line showing the average speed of price changes.

Directional Average Speed has two outputs (if not cumulative):
One for up-candle average speed
One for down-candle average speed

Cumulative Mode:
The Directional version has a Cumulative option to merge the up/down values into a single stream (as either a difference or sum), something not available in the original.

Absolute (Use absolute value)
If enabled (true), calculates the absolute price change (ignores direction). If disabled, the indicator retains the direction (positive for up, negative for down).

Cumulative
If enabled, combines up and down speeds into a single line. If disabled, displays two separate lines: one for average speed during price increases, and one for price decreases.
Directional_Average_Speed.lua
(8.5 KiB) Downloaded 255 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 38770
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Average speed

Postby mayk01 » Thu Mar 27, 2025 4:31 am

Great! :) The two-sided one is also very good, I think both are very useful.
I noticed with the alarm version that it starts with an error message, but when I pretend to modify it and click "OK" it works fine.
The log says this:
Line 564:
"Specified index is out of range."

Regards,
M.
mayk01
 
Posts: 48
Joined: Tue Nov 14, 2017 3:38 pm

Re: Average speed

Postby Apprentice » Mon Mar 31, 2025 4:01 am

We have added your request to the development list.
Development reference 244
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 38770
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Average speed

Postby Apprentice » Mon Mar 31, 2025 4:17 am

Average_Speed with Alert.lua
(22.92 KiB) Downloaded 201 times

Try this version.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 38770
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Next

Return to Custom Indicators

Who is online

Users browsing this forum: Bing [Bot] and 7 guests