NexusFi: Find Your Edge


Home Menu

 





ROC on an EMA


Discussion in ThinkOrSwim

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




 
Search this Thread
  #1 (permalink)
 ositokillao 
Miami FL/USA
 
Experience: Beginner
Platform: TOS
Trading: stocks
Posts: 21 since Feb 2015
Thanks Given: 0
Thanks Received: 0

Can anybody please, help me out here?

I am trying to set up the ROC of an EMA indicator.

I had a sample link where they use it but I can't post links yet.

Thank you.


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
CFTC Requests Tag 50 Trader Identity Data From CME and I …
Traders Hideout
Iran Fired a Missile at Israel Last Night. The $8M June …
Prediction Markets & Event Contracts
Six Days to Kickoff: World Cup Prediction Markets Hit $1 …
Prediction Markets & Event Contracts
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
Trump Lands in Beijing on CPI Day: Iran Peace Expires To …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,099 since Jun 2009
Thanks Given: 877
Thanks Received: 8,098


ositokillao View Post
Can anybody please, help me out here?

I am trying to set up the ROC of an EMA indicator.

I had a sample link where they use it but I can't post links yet.

Thank you.

go to ROC setting and change its input to EMA, an example


Reply With Quote
  #3 (permalink)
 ositokillao 
Miami FL/USA
 
Experience: Beginner
Platform: TOS
Trading: stocks
Posts: 21 since Feb 2015
Thanks Given: 0
Thanks Received: 0



cory View Post
go to ROC setting and change its input to EMA, an example

I already tried that but I can't add EMA to the Inputs scroll box?

Is that even possible?

Here is a working example of the ROC EMA indicator Iam trying to get going:

https://www.whselfinvest.com/en/trading_strategies_03_rocema.php


Started this thread Reply With Quote
  #4 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,099 since Jun 2009
Thanks Given: 877
Thanks Received: 8,098

not sure what you mean, tale a look at this


Attached Thumbnails
Click image for larger version

Name:	2015-02-02_1343.png
Views:	225
Size:	106.1 KB
ID:	173690   Click image for larger version

Name:	2015-02-02_1349.png
Views:	238
Size:	17.7 KB
ID:	173691  
Reply With Quote
  #5 (permalink)
 ositokillao 
Miami FL/USA
 
Experience: Beginner
Platform: TOS
Trading: stocks
Posts: 21 since Feb 2015
Thanks Given: 0
Thanks Received: 0


cory View Post
not sure what you mean, tale a look at this

yeah thats in NT

I am using TOS. I wish TOS would allow me to do something like that.

There must be a way ...


Started this thread Reply With Quote
  #6 (permalink)
 
rmejia's Avatar
 rmejia 
Puerto Rico
 
Experience: Intermediate
Platform: thinkorswim
Broker: TD Ameritrade
Trading: Options
Posts: 379 since Oct 2010
Thanks Given: 3,614
Thanks Received: 441

Is it something like this?

https://www.yahoo.com/


Quoting 
algoeric Jun 18, 2013

Here's my rendition of a rate of change script. Plots the rate of change for the 5 period and the 252 period with some EMA smoothing.

 
Code
# Rate of Change Script
    # Coded by Eric Rasmussen
    # ericrasmussentx@...

# Bullish
    # 252 day ROC crosses above 5 day ROC and the next day is        still above 5 day
# Bearish
    # 252 day ROC crosses below 5 day ROC and the next day is        still below 5 day

declare lower;

input smooth = 5;

def roc5day = 
ExpAverage(((close - close[4]) / close[4]) * 100, length = smooth);

def roc252day =
ExpAverage(((close - close[251]) / close[251]) * 100, length = smooth);

def crossUp = roc252day crosses above roc5day;
def crossDown = roc252day crosses below roc5day;

# Plots 
plot roc252 = roc252day;
roc252.AssignValueColor(if roc252day > roc5day then color.GREEN else color.RED);
roc252.SetPaintingStrategy(paintingStrategy.LINE);
roc252.SetLineWeight(1);

plot zero = if !IsNaN(close) then 0 else double.NaN;
zero.SetPaintingStrategy(PaintingStrategy.LINE);
zero.AssignValueColor(if roc252day > roc5day then color.GREEN else color.RED);
zero.SetLineWeight(2);
zero.HideTitle();

plot downCross = if crossDown[-1] then 0 else double.NaN;
downCross.SetPaintingStrategy(PaintingStrategy.POINTS);
downCross.AssignValueColor(color = Color.RED);
downCross.SetLineWeight(3);
downCross.HideTitle();

plot downCross2 = if crossDown[-1] then 0 else Double.NaN;
downCross2.SetPaintingStrategy(PaintingStrategy.POINTS);
downCross2.AssignValueColor(color = Color.WHITE);
downCross2.SetLineWeight(5);
downCross2.HideTitle();

plot upCross = if crossUp[-1] then 0 else Double.NaN;
upCross.SetPaintingStrategy(PaintingStrategy.POINTS);
upCross.AssignValueColor(color = color.GREEN);
upCross.SetLineWeight(3);
upCross.HideTitle();

plot upCross2 = if crossUp[-1] then 0 else Double.NaN;
upCross2.SetPaintingStrategy(PaintingStrategy.POINTS);
upCross2.AssignValueColor(color = Color.WHITE);
upCross2.SetLineWeight(5);
upCross2.HideTitle();

AddCloud(0, roc252day, color1 = color.RED, color2 = color.GREEN);
AddCloud(0, roc252day, color1 = color.RED, color2 = color.GREEN);


Reply With Quote
  #7 (permalink)
 ositokillao 
Miami FL/USA
 
Experience: Beginner
Platform: TOS
Trading: stocks
Posts: 21 since Feb 2015
Thanks Given: 0
Thanks Received: 0


rmejia View Post
Is it something like this?

https://www.yahoo.com/



 
Code
# Rate of Change Script
    # Coded by Eric Rasmussen
    # ericrasmussentx@...

# Bullish
    # 252 day ROC crosses above 5 day ROC and the next day is        still above 5 day
# Bearish
    # 252 day ROC crosses below 5 day ROC and the next day is        still below 5 day

declare lower;

input smooth = 5;

def roc5day = 
ExpAverage(((close - close[4]) / close[4]) * 100, length = smooth);

def roc252day =
ExpAverage(((close - close[251]) / close[251]) * 100, length = smooth);

def crossUp = roc252day crosses above roc5day;
def crossDown = roc252day crosses below roc5day;

# Plots 
plot roc252 = roc252day;
roc252.AssignValueColor(if roc252day > roc5day then color.GREEN else color.RED);
roc252.SetPaintingStrategy(paintingStrategy.LINE);
roc252.SetLineWeight(1);

plot zero = if !IsNaN(close) then 0 else double.NaN;
zero.SetPaintingStrategy(PaintingStrategy.LINE);
zero.AssignValueColor(if roc252day > roc5day then color.GREEN else color.RED);
zero.SetLineWeight(2);
zero.HideTitle();

plot downCross = if crossDown[-1] then 0 else double.NaN;
downCross.SetPaintingStrategy(PaintingStrategy.POINTS);
downCross.AssignValueColor(color = Color.RED);
downCross.SetLineWeight(3);
downCross.HideTitle();

plot downCross2 = if crossDown[-1] then 0 else Double.NaN;
downCross2.SetPaintingStrategy(PaintingStrategy.POINTS);
downCross2.AssignValueColor(color = Color.WHITE);
downCross2.SetLineWeight(5);
downCross2.HideTitle();

plot upCross = if crossUp[-1] then 0 else Double.NaN;
upCross.SetPaintingStrategy(PaintingStrategy.POINTS);
upCross.AssignValueColor(color = color.GREEN);
upCross.SetLineWeight(3);
upCross.HideTitle();

plot upCross2 = if crossUp[-1] then 0 else Double.NaN;
upCross2.SetPaintingStrategy(PaintingStrategy.POINTS);
upCross2.AssignValueColor(color = Color.WHITE);
upCross2.SetLineWeight(5);
upCross2.HideTitle();

AddCloud(0, roc252day, color1 = color.RED, color2 = color.GREEN);
AddCloud(0, roc252day, color1 = color.RED, color2 = color.GREEN);




thanks but not exactly I think

here is a working sample of what I am looking for:

https://www.whselfinvest.com/en/trading_strategies_03_rocema.php

On the actual page they show it with a basic line that changes color. If you click on the EXPLANATORY VIDEO
link you will see it again, this time with a HISTOGRAM kind of setting...

Basically I need a ROC for an EMA of 16 time periods.


Started this thread Reply With Quote




Last Updated on February 2, 2015


© 2026 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 - Downloads - Top
no new posts