NexusFi: Find Your Edge


Home Menu

 





FX Scan / Thinkscript


Discussion in ThinkOrSwim

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




 
Search this Thread

FX Scan / Thinkscript

  #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?
Trade idea based off three indicators.
Traders Hideout
Quant vue
Trading Reviews and Vendors
Could it be that currency futures are way easier to trade?
Currencies
How to apply profiles
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
 
  #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 
Burnaby, BC Canada
 
Experience: Advanced
Platform: Ninjatrader
Broker: Ironbeam, Kinetick
Trading: ES, CL, RTY
Posts: 233 since Apr 2014
Thanks Given: 758
Thanks Received: 201

Hi,

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

Follow me on Twitter Reply With Quote




Last Updated on September 19, 2017


© 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