Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Updated September 14, 2016
Top Posters
looks_one
banana10
with 2 posts (0 thanks)
looks_two
sam028
with 2 posts (2 thanks)
looks_3
Quick Summary
with 1 posts (0 thanks)
looks_4
ABCTG
with 1 posts (0 thanks)
trending_up
2,400 views
thumb_up
2 thanks given
group
3 followers
forum
5 posts
attach_file
0 attachments
September 13th, 2016, 12:03 PM
New york NY USA
Posts: 2 since Sep 2016
Thanks Given: 0
Thanks Received: 0
Hello,
I am trying to find out how to find a similar function "Xaverage" in python.
This is what I have in easylanguage : test = XAverage( Close, Length ) and I am trying to change it into python.
Thank you very much.
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
September 13th, 2016, 01:04 PM
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,630
banana10
Hello,
I am trying to find out how to find a similar function "Xaverage" in python.
This is what I have in
easylanguage : test = XAverage( Close, Length ) and I am trying to change it into python.
Thank you very much.
In pure Python, with NumPy, with another library?
Success requires no deodorant! (Sun Tzu)
September 13th, 2016, 01:23 PM
New york NY USA
Posts: 2 since Sep 2016
Thanks Given: 0
Thanks Received: 0
sam028
In pure Python, with NumPy, with another library?
I have installed both libraries:
import matplotlib.pyplot as plt
# import numpy as np
either ones work for me. Thanks a lot.
September 14th, 2016, 06:32 AM
Posts: 2,441 since Apr 2013
Thanks Given: 491
Thanks Received: 1,634
banana10
XAverage is simply an exponential average. I am pretty sure that is either available already or you can easily program it or find code via google.
Regards,
ABCTG
September 14th, 2016, 10:32 AM
Posts: 3,765 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,630
banana10
I have installed both libraries:
import matplotlib.pyplot as plt
# import numpy as np
either ones work for me. Thanks a lot.
You can find good examples here .
An easy to understand one is:
Code
def moving_average ( x , n , type ):
x = np . asarray ( x )
if type == 'simple' :
weights = np . ones ( n )
else:
weights = np . exp ( np . linspace (- 1. , 0. , n ))
weights /= weights . sum ()
a = np . convolve ( x , weights , mode = 'full' )[: len ( x )]
a [: n ] = a [ n ]
return a
Success requires no deodorant! (Sun Tzu)
Last Updated on September 14, 2016