Dark Theme
Light Theme
Welcome to NexusFi: the best trading community on the planet, with over 200,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 -- discounts are available after registering.
-- 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
sam028
with 2 posts (2 thanks)
looks_two
banana10
with 2 posts (0 thanks)
looks_3
ABCTG
with 1 posts (0 thanks)
looks_4
Quick Summary
with 1 posts (0 thanks)
trending_up
2,846 views
thumb_up
2 thanks given
group
3 followers
forum
5 posts
attach_file
0 attachments
September 13th, 2016, 11:03 AM
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, 12:04 PM
Posts: 3,756 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,632
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, 12: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, 05:32 AM
Posts: 2,447 since Apr 2013
Thanks Given: 493
Thanks Received: 1,639
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, 09:32 AM
Posts: 3,756 since Jun 2009
Thanks Given: 3,825
Thanks Received: 4,632
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