NexusFi: Find Your Edge


Home Menu

 





Multiple time frame EMA


Discussion in TradeStation

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




 
Search this Thread

Multiple time frame EMA

  #1 (permalink)
phuping
Chiang Mai+Chiang Mai
 
Posts: 1 since Sep 2014
Thanks Given: 0
Thanks Received: 0

I have tried to write indicators by reference to EMA of different time frames using multiple sets of data in the same charts. But the results were not accurate in time synchronization.

I found these amazing ones. They plotted EMA 20 of time frame 15 and 60 minutes on 5-minute chart accurately and the time synchronization was precise.

I would like EMA 50 of time frame 5 and 15 minutes on 1-minute chart and SMA 20 of time frame 5 and 15 minutes on 1-minute chart. How can I write it by modifying the indicators below? I think the number of current bar and Fracportion should be changed but I didn't understand the logic behind it.

Thank you.

{EMA20 of time frame 15 minutes on 5-minute chart}

Inputs: length(20);

If CurrentBar = 60 then Value1 = xaverage(C, 60);

If CurrentBar > 60 then begin

If Fracportion(time/15) = 0 then begin

value1 = value1[1] + (2 / ( Length + 1 )) * ( C - value1[1] );
Value2 = value1;
Plot1(value1, "15 min 20EMA");

end
else begin
Value2 = value1 + (2 / ( Length + 1 )) * ( C - value1[1] );
Plot1(value2, "15 min 20EMA");
end;end;

{EMA20 of time frame 60 minutes on 5-minute chart}

Inputs: length(20);


If CurrentBar = 240 then Value1 = xaverage(C, 240);

If CurrentBar > 240 then begin

If Fracportion((time - 30)/100) = 0 or time =1315 then begin

value1 = value1[1] + (2 / ( Length + 1 )) * ( C - value1[1] );
Value2 = value1;
Plot1(value1, "60 min 20EMA");

end
else begin
Value2 = value1 + (2 / ( Length + 1 )) * ( C - value1[1] );
Plot1(value2, "60 min 20EMA");
end;end;

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Cheap historycal L1 data for stocks
Stocks and ETFs
REcommedations for programming help
Sierra Chart
About a successful futures trader who didnt know anythin …
Psychology and Money Management
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
 
  #2 (permalink)
 e4williams 
Amarillo Texas/USA
 
Posts: 63 since Dec 2014


phuping View Post
I have tried to write indicators by reference to EMA of different time frames using multiple sets of data in the same charts. But the results were not accurate in time synchronization.

I found these amazing ones. They plotted EMA 20 of time frame 15 and 60 minutes on 5-minute chart accurately and the time synchronization was precise.

I would like EMA 50 of time frame 5 and 15 minutes on 1-minute chart and SMA 20 of time frame 5 and 15 minutes on 1-minute chart. How can I write it by modifying the indicators below? I think the number of current bar and Fracportion should be changed but I didn't understand the logic behind it.

Thank you.

{EMA20 of time frame 15 minutes on 5-minute chart}

Inputs: length(20);

If CurrentBar = 60 then Value1 = xaverage(C, 60);



If CurrentBar > 60 then begin

If Fracportion(time/15) = 0 then begin

value1 = value1[1] + (2 / ( Length + 1 )) * ( C - value1[1] );
Value2 = value1;
Plot1(value1, "15 min 20EMA");

end
else begin
Value2 = value1 + (2 / ( Length + 1 )) * ( C - value1[1] );
Plot1(value2, "15 min 20EMA");
end;end;

{EMA20 of time frame 60 minutes on 5-minute chart}

Inputs: length(20);


If CurrentBar = 240 then Value1 = xaverage(C, 240);

If CurrentBar > 240 then begin

If Fracportion((time - 30)/100) = 0 or time =1315 then begin

value1 = value1[1] + (2 / ( Length + 1 )) * ( C - value1[1] );
Value2 = value1;
Plot1(value1, "60 min 20EMA");

end
else begin
Value2 = value1 + (2 / ( Length + 1 )) * ( C - value1[1] );
Plot1(value2, "60 min 20EMA");
end;end;

There might be a much easier way to do this.
I have played around a bit with this myself but differently.

I may not be correct with my figures but for example.

a 50 ma on an hourly chart would possibly become a 100 ma on a 30 minute chart.

and try doubling the MAs 50 ma to 100 ma to 200 ma to 400 ma up to 1000 ma. to find which ma match up from 15 min and 5 min charts to 1 min chart

Seemed to work for me.

Reply With Quote
  #3 (permalink)
 e4williams 
Amarillo Texas/USA
 
Posts: 63 since Dec 2014


I would like to expand upon what this person has asked. I find this to be a very relevant and important question.

This is also something that has bothered me for some time.

He is trying to place a 50 EMA on a lower time frame... to quote him

" I would like EMA 50 of time frame 5 and 15 minutes on 1-minute chart and SMA 20 of time frame 5 and 15 minutes on 1-minute chart."

And this is confusing..

But let's take that same question and take that to a daily chart. A 50 EMA on a daily chart is the 50 EMA calculated daily exponentially over 50 days.

If you take that 50 EMA to an hourly chart, the 50 EMA is now calculated over 50 periods of an hour.

How would one take the daily 50 EMA and apply this to the hourly chart?


I take this person's question very seriously.


Any one with the know how about this,... please clue us in.

Reply With Quote
  #4 (permalink)
 
rahulgopi's Avatar
 rahulgopi 
milpitas, ca, usa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Tradestation
Broker: Tradestation, Ameritrade
Trading: ES, Gold, 10 Yr
Posts: 1,723 since Feb 2014
Thanks Given: 1,389
Thanks Received: 4,206


e4williams View Post
I would like to expand upon what this person has asked. I find this to be a very relevant and important question.

This is also something that has bothered me for some time.

He is trying to place a 50 EMA on a lower time frame... to quote him

" I would like EMA 50 of time frame 5 and 15 minutes on 1-minute chart and SMA 20 of time frame 5 and 15 minutes on 1-minute chart."

And this is confusing..

But let's take that same question and take that to a daily chart. A 50 EMA on a daily chart is the 50 EMA calculated daily exponentially over 50 days.

If you take that 50 EMA to an hourly chart, the 50 EMA is now calculated over 50 periods of an hour.

How would one take the daily 50 EMA and apply this to the hourly chart?


I take this person's question very seriously.


Any one with the know how about this,... please clue us in.


It is fairly simple when the lower time frame candles used on the chart can be combined to form larger candles. For e.g

chart time frame : 5 min
15 min : create a block of 3 five min candles and track open, high, low, close for this block.
30 min : create a block of 6 five min candles and track open, high, low, close for this block.

Please note it wont start plotting until you have enough in each block.

ADE is another option for combining inputs from multiple time frames. For e.g you can use ADE to send daily EMA to a 5 min chart.

Here is an example I coded for sending 24 Hr VWAP to a RTH chart using ADE


Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote




Last Updated on May 15, 2015


© 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