NexusFi: Find Your Edge


Home Menu

 





FX Scan / Thinkscript


Discussion in ThinkOrSwim

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




 
Search this Thread
  #1 (permalink)
atxrocks121
Austin Texas
 
Posts: 5 since Jun 2015
Thanks Given: 1
Thanks Received: 2

Hi there...I have this scan in ToS that works well in scanning stocks and etfs. But when I apply it to FX, I get very strange results. My theory is that is has to do with the time length concept. This scan is pulling the high/low for the last 20 days and also using the close (for stocks & etf's). However, in FX there obviously is no close during the week and is ToS smart enough to be using the 20 days, or is the scan using the last 20 weeks?

If this theory is correct, how do I tell ToS to scan the last 24 hours (or whatever the appropriate FX item is)?

My scan:
def Upper = Highest(high, 20);
def Lower = Lowest(low, 20);
def UpperPrev = Upper[5];

def ma20 = MovingAverage(AverageType.EXPONENTIAL, close, 20);
def ma50 = MovingAverage(AverageType.EXPONENTIAL, close, 50);
def ma20Prev = ma20[5];
def PercentageMove = (((ma20 - ma20Prev) / ma20Prev) * 100);

def VF = ((Upper - Lower) / close) * 100;
def VFavg = MovingAverage(AverageType.EXPONENTIAL, VF, 20);

def c1 = ma20 >= ma50;
def c2 = PercentageMove >= 1 and PercentageMove <= 50;
def c3 = Upper >= UpperPrev;
def c5 = (((Close-ma50) / ma50) < 0.50);

plot signal = c1 and c2 and c3 and c5;


Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
EA
Platforms and Indicators
My Rant with AMP Futures
Trading Reviews and Vendors
Datafeed for Atas
Platforms and Indicators
No book, only a stair: journaling fills where price move …
Cryptocurrency
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
TopStep Trader disappointment
2 thanks
Johnnys Journal
2 thanks
  #2 (permalink)
HaydenP
Carthage Texas Usa
 
Posts: 15 since Jun 2015
Thanks Given: 0
Thanks Received: 2


atxrocks121 View Post
Hi there...I have this scan in ToS that works well in scanning stocks and etfs. But when I apply it to FX, I get very strange results. My theory is that is has to do with the time length concept. This scan is pulling the high/low for the last 20 days and also using the close (for stocks & etf's). However, in FX there obviously is no close during the week and is ToS smart enough to be using the 20 days, or is the scan using the last 20 weeks?

If this theory is correct, how do I tell ToS to scan the last 24 hours (or whatever the appropriate FX item is)?

My scan:
def Upper = Highest(high, 20);
def Lower = Lowest(low, 20);
def UpperPrev = Upper[5];

def ma20 = MovingAverage(AverageType.EXPONENTIAL, close, 20);
def ma50 = MovingAverage(AverageType.EXPONENTIAL, close, 50);
def ma20Prev = ma20[5];
def PercentageMove = (((ma20 - ma20Prev) / ma20Prev) * 100);

def VF = ((Upper - Lower) / close) * 100;
def VFavg = MovingAverage(AverageType.EXPONENTIAL, VF, 20);

def c1 = ma20 >= ma50;
def c2 = PercentageMove >= 1 and PercentageMove <= 50;
def c3 = Upper >= UpperPrev;
def c5 = (((Close-ma50) / ma50) < 0.50);

plot signal = c1 and c2 and c3 and c5;

You are correct with your assumption. You will need to use a secondary aggregation. If you need instructions let me know


Reply With Quote
  #3 (permalink)
atxrocks121
Austin Texas
 
Posts: 5 since Jun 2015
Thanks Given: 1
Thanks Received: 2


Hi Hayden,
Yes, I need help as I have yet to figure this out...feel free to PM me.


Reply With Quote
  #4 (permalink)
 NGtrader 
Vancouver, BC Canada
 
Experience: Advanced
Platform: Ninjatrader
Broker: Ironbeam, Kinetick
Trading: ES, CL
Posts: 237 since Apr 2014
Thanks Given: 760
Thanks Received: 206

Hi,

Did you ever figure out a way to scan currencies in TOS?


Follow me on X Reply With Quote




Last Updated on September 19, 2017


© 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