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.
-- The NexusFi team
(If you already have an account, login at the top of the page)
Updated April 23, 2019
trending_up
2,466 views
thumb_up
0 thanks given
group
3 followers
forum
2 posts
attach_file
0 attachments
April 20th, 2019, 04:52 AM
Seoul Korea
Posts: 16 since Mar 2018
Thanks Given: 18
Thanks Received: 1
Hello,
Can you help me editing the following code of On Balance Volume? I want to add 3, 21 and 50 period of EMA on OBV.
------------------------------
#
# TD Ameritrade IP Company, Inc. (c) 2008-2019
#
declare lower;
plot OBV = TotalSum(Sign(close - close[1]) * volume);
OBV.SetDefaultColor(GetColor(8));
---------------------------
Thanks!
Can you help answer these questions from other members on NexusFi?
Best Threads (Most Thanked) in the last 7 days on NexusFi
April 22nd, 2019, 09:43 PM
NY, NY
Posts: 68 since Dec 2011
Thanks Given: 27
Thanks Received: 19
Hi,
Try this:
Code
declare lower;
plot OBV = TotalSum(Sign(close - close[1]) * volume);
OBV.SetDefaultColor(GetColor(8));
OBV.SetLineWeight(2);
def price1 = OBV;
input length1 = 3;
input averageType1 = AverageType.EXPONENTIAL;
plot MA1 = MovingAverage(averageType1, price1, length1);
MA1.SetDefaultColor(Color.GREEN);
MA1.SetLineWeight(2);
def price2 = OBV;
input length2 = 21;
input averageType2 = AverageType.EXPONENTIAL;
plot MA2 = MovingAverage(averageType2, price2, length2);
MA2.SetDefaultColor(Color.YELLOW);
MA2.SetLineWeight(2);
def price3 = OBV;
input length3 = 50;
input averageType3 = AverageType.EXPONENTIAL;
plot MA3 = MovingAverage(averageType3, price3, length3);
MA3.SetDefaultColor(Color.RED);
MA3.SetLineWeight(2);
Hope this helps...
Good Luck and Good Trading
April 23rd, 2019, 09:05 PM
Seoul Korea
Posts: 16 since Mar 2018
Thanks Given: 18
Thanks Received: 1
netarchitech
Hi,
Try this:
Code
declare lower;
plot OBV = TotalSum(Sign(close - close[1]) * volume);
OBV.SetDefaultColor(GetColor(8));
OBV.SetLineWeight(2);
def price1 = OBV;
input length1 = 3;
input averageType1 = AverageType.EXPONENTIAL;
plot MA1 = MovingAverage(averageType1, price1, length1);
MA1.SetDefaultColor(Color.GREEN);
MA1.SetLineWeight(2);
def price2 = OBV;
input length2 = 21;
input averageType2 = AverageType.EXPONENTIAL;
plot MA2 = MovingAverage(averageType2, price2, length2);
MA2.SetDefaultColor(Color.YELLOW);
MA2.SetLineWeight(2);
def price3 = OBV;
input length3 = 50;
input averageType3 = AverageType.EXPONENTIAL;
plot MA3 = MovingAverage(averageType3, price3, length3);
MA3.SetDefaultColor(Color.RED);
MA3.SetLineWeight(2);
Hope this helps...
Good Luck and Good Trading
Thank you very much for your quick help. I really appreciate it!
Cheers,
Last Updated on April 23, 2019