Horizontal Moving Average? - futures io
futures io

Horizontal Moving Average?

Discussion in ThinkOrSwim

    1. trending_up 2,658 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 3 posts
    2. 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)

Search this Thread

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.

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.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));

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;
plot LowerBand = AvgLine + LowerDev * StDev;

plot BaseLine = 0;
plot Overbought = 800;
plot Oversold = -800;
Beats having a separate $TICK chart open. I also added a StDev 2 Bollinger Band and +/-800 lines.

Reply With Quote

Can you help answer these questions
from other members on futures io?
Eurex Denali vs dxFeed
Sierra Chart
For the experts of Metastock
Platforms and Indicators
MacdBB V402 NT804 + gradient + pullback not working on N …
Help with adding an alert to an indicator
EasyLanguage Programming
Experience with AGN (Introducing Broker)
Best Threads (Most Thanked)
in the last 7 days on futures io
How quickly do algos go bad?
26 thanks
Question about intraday margins
24 thanks
Webinar: Building a System for Trading Psychology w/Jare …
18 thanks
Want your NinjaTrader indicator created, free?
16 thanks
Wyckoff room
12 thanks
(login for full post details)
  #2 (permalink)
 Big Mike 
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
Big Mike's Avatar
Posts: 50,128 since Jun 2009
Thanks: 32,599 given, 98,768 received

You can attach images, just not from external sources.

Search for ADXVMA, it does what you want.


We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:

Visit other sites? Please spread the word about your experience with our community!
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
(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.

Attached Thumbnails
Click image for larger version

Name:	horizontalmovingaverage.JPG
Views:	118
Size:	51.4 KB
ID:	159433  
Reply With Quote
(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: 54 since Jul 2012
Thanks: 449 given, 47 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;

Reply With Quote

futures io Trading Community Platforms and Indicators ThinkOrSwim > Horizontal Moving Average?

Last Updated on October 19, 2014

Upcoming Webinars and Events

NinjaTrader Indicator Challenge!


Futures.io Happy Hour with Cem Karsan w/Cem Karsan

Elite only

Our 12-year anniversary w/ $$,$$$ prizes (check soon)


Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts