Trading Articles
Article Categories
Article Tools
Horizontal Moving Average?
Updated October 19, 2014
trending_up
2,536 views
thumb_up
0 thanks given
group
1 followers
forum
3 posts
attach_file
1 attachments
Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
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 and simple.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Horizontal Moving Average?
(login for full post details)
#1 (permalink )
Charlottesville, VA
Posts: 21 since Apr 2014
Thanks: 0 given,
13
received
Hello, I'm trying to plot a horizontal moving average . I'm not sure how to do it. I'd provide an example but I am not allowed to post images or links. Basically I just want it like
------------------------------------------------------- 100.01
rather than the curved up and down moving average.
I have for example
def F10Length = 55;
def F10 = ExpAverage(Price, F10Length);
plot Fib55 = F10;
But it shows up as a curved line. I don't know how to get averages to plot horizontally like the Camarilla Points indicator for example.
To support the forum, I made the following Tick Index indicator.
Code
declare lower;
input Period = 21;
plot TickIndex = close("$TICK");
#You can change the index by changing the symbol between the " ".
#$TICK = NYSE Index
#$TIKQ = NASDAQ Cumulative Index
#$TIKRL = Russell 2000 Index
#$TIKSP = S&P 500 Index
#$TIKI = DJIA Index
#$TIKUS = All US Stock Index
TickIndex.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
TickIndex.DefineColor("Up", Color.UPTICK);
TickIndex.DefineColor("Down", Color.DOWNTICK);
TickIndex.AssignValueColor(if TickIndex > 0 then TickIndex.color("Up") else if TickIndex < 0 then TickIndex.color("Down") else GetColor(4));
TickIndex.SetLineWeight(3);
def StDev = stdev(data = TickIndex, length = period);
def AvgLine = Average(data = TickIndex, length = period);
def UpperDev = 2.0;
def LowerDev = -2.0;
plot UpperBand = AvgLine + UpperDev * StDev;
Upperband.SetDefaultColor(color.RED);
plot LowerBand = AvgLine + LowerDev * StDev;
LowerBand.SetDefaultColor(color.GREEN);
plot BaseLine = 0;
BaseLine.SetDefaultColor(color.GRAY);
plot Overbought = 800;
Overbought.SetDefaultColor(color.GRAY);
plot Oversold = -800;
Oversold.SetDefaultColor(color.GRAY);
Beats having a separate $TICK chart open. I also added a StDev 2 Bollinger Band and +/-800 lines.
Can you help answer these questions from other members on futures io?
Best Threads (Most Thanked) in the last 7 days on futures io
(login for full post details)
#2 (permalink )
Site Administrator Swing Trader Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
Posts: 49,779 since Jun 2009
Thanks: 32,306 given,
97,566
received
You can attach images, just not from external sources.
Search for ADXVMA , it does what you want.
Mike
(login for full post details)
#3 (permalink )
Charlottesville, VA
Posts: 21 since Apr 2014
Thanks: 0 given,
13
received
Thank you. I only found 1 result searching this forum and it's not exactly what I was explaining.
I'm trying to get my moving averages to plot horizontally like the picture I attached.
(login for full post details)
#4 (permalink )
New York City New York USA
Experience: Intermediate
Platform: Think or Swim, Infinity Futures
Broker: Thinkor Swim for Charts an Infinity Futures for Trading Dom
Trading: Oil
Posts: 52 since Jul 2012
Thanks: 448 given,
46
received
try this
#Horizontal Line
input n = 9;
def a = Average(close, n);
def c = HighestAll(if IsNaN(close[-1]) then a else Double.NaN);
plot l = c;
l.SetPaintingStrategy(PaintingStrategy.line);
l.SetLineWeight(1);
l.SetDefaultColor(color.white);
Last Updated on October 19, 2014
Right now
Ongoing
Right now
March
Register to Attend
Elite only
Coming soon
April