NexusFi: Find Your Edge


Home Menu

 





SMA on different time frames


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one fcg1 with 1 posts (0 thanks)
    2. looks_two Latitude with 1 posts (1 thanks)
    3. looks_3 mtzimmer1 with 1 posts (0 thanks)
    4. looks_4 tebteb36 with 1 posts (0 thanks)
    1. trending_up 1,033 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

SMA on different time frames

  #1 (permalink)
Latitude
Edmonton Alberta, Canada
 
Posts: 1 since Dec 2019
Thanks Given: 0
Thanks Received: 1

Hello everyone,

Looking to see if there's an easy answer for this. I'm looking to differentiate moving averages based on times frames.
For example, on my daily chart I want the 20,50,200 Simple Moving Average(SMA) and on the weekly and monthly I want a 10 SMA. The problem is when I add a study it's applied to all times frames. Is there a way to separate it?

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
Cheap historycal L1 data for stocks
Stocks and ETFs
Quantum physics & Trading dynamics
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
26 thanks
What is Markets Chat (markets.chat) real-time trading ro …
15 thanks
ApexTraderFunding.com experience and review
13 thanks
Trading with Intuition
11 thanks
EG Indicators
11 thanks
  #2 (permalink)
 
mtzimmer1's Avatar
 mtzimmer1 
Upstate NY
Recovering Method Hopper
 
Experience: Intermediate
Platform: TOS
Broker: TD Ameritrade
Trading: Equities, Treasuries, Gold
Posts: 840 since Dec 2018
Thanks Given: 2,201
Thanks Received: 1,918

As far as I am aware there is not a way to achieve this.

One alternative is to have two charts open on flexible charts, each with separate studies.

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 fcg1 
Alma, WI
 
Experience: Advanced
Platform: Sierra Chart, TOS
Trading: NQ, ES, ZB, CL
Posts: 2 since Mar 2019
Thanks Given: 0
Thanks Received: 0


(quirk: sometimes I saw the sma1 value in the data box, not the chart for say Weekly until something changed on the chart and it recalc'd) but try:

input sma_len_1 = 10;
input sma_len_2 = 20;
input sma_len_3 = 50;
input sma_len_4 = 200;

def agg = GetAggregationPeriod();

plot sma1 = MovingAverage(AverageType.SIMPLE, close, sma_len_1);
sma1.SetHiding (Agg > AggregationPeriod.DAY or Agg < AggregationPeriod.DAY);
plot sma2 = MovingAverage(AverageType.Simple,Close,sma_len_2);
sma2.SetHiding (Agg < AggregationPeriod.Week);
plot sma3 = MovingAverage(AverageType.SIMPLE, close, sma_len_3);
sma3.SetHiding (Agg < AggregationPeriod.Week);
plot sma4 = MovingAverage(AverageType.SIMPLE, close, sma_len_4);
sma4.SetHiding (Agg < AggregationPeriod.Week);

Reply With Quote




Last Updated on December 11, 2019


© 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