NexusFi: Find Your Edge


Home Menu

 





Horizontal Moving Average?


Discussion in ThinkOrSwim

Updated
    1. trending_up 3,652 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 3 posts
    2. attach_file 1 attachments




 
Search this Thread

Horizontal Moving Average?

  #1 (permalink)
chrisplecker
Charlottesville, VA
 
Posts: 21 since Apr 2014
Thanks Given: 0
Thanks Received: 13

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.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Cheap historycal L1 data for stocks
Stocks and ETFs
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
22 thanks
What is Markets Chat (markets.chat) real-time trading ro …
19 thanks
GFIs1 1 DAX trade per day journal
15 thanks
ApexTraderFunding.com experience and review
15 thanks
EG Indicators
11 thanks
  #2 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,471 since Jun 2009
Thanks Given: 33,250
Thanks Received: 101,674

You can attach images, just not from external sources.

Search for ADXVMA, it does what you want.

Mike



Join the free Markets Chat beta: one platform, all the trade rooms!

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
chrisplecker
Charlottesville, VA
 
Posts: 21 since Apr 2014
Thanks Given: 0
Thanks Received: 13


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:	187
Size:	51.4 KB
ID:	159433  
Reply With Quote
  #4 (permalink)
 Hguru 
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 Given: 449
Thanks Received: 48

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

Reply With Quote




Last Updated on October 19, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts