ETF to Futures Half Gap - futures io
futures io



ETF to Futures Half Gap


Discussion in ThinkOrSwim

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




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

ETF to Futures Half Gap

(login for full post details)
  #1 (permalink)
AstroTuna
Chicago, IL
 
 
Posts: 12 since Jan 2020
Thanks: 0 given, 7 received

Here's a handy script. I find that half gaps are often good bounce/resistance points. That would be half of the distance between the previous days' ETF close and the next open at 930am EST.

Place it on a futures chart and see if you like it. The default setting is for SPY. So you would want to view it on the /ES chart.

 
Code
#  name: ETF_to_Futures_HalfGap

#input Choose_Underline_Equity = "";
# use GLD (for /GC), USO (for /CL), SOYB (for /ZS)
input symbol = "SPY"; #USE SPY SYMBOL IF VIEWING THE /ES CHART
#HIDES WALLS FOR PREVIOUS DAYS
input showOnlyLastPeriod = yes;



#COLLECTS OPEN PRICE FOR CHART SYMBOL
def ChartSymbol = if GetTime() crosses above RegularTradingStart(GetYYYYMMDD()) then open else ChartSymbol[1];

#COLLECTS OPEN PRICE FOR EQUITY SYMBOL
def SymbolData = if open(symbol, AggregationPeriod.DAY, "Last") then open(symbol, AggregationPeriod.DAY, "Last") else SymbolData[1];

#PLOT WALL START/END TIME
def StartTime = 0530;
def EndTime = 1600;

#COUNTER
def startCounter = SecondsFromTime(StartTime);
def endCounter = SecondsTillTime(EndTime);
def RTHPeriod = if startCounter >= 0 and endCounter >= 0 then 1 else 0;

#SESSION PLOT
def RTHPlot = if showOnlyLastPeriod then GetLastDay() <= GetDay() and GetLastYear() <= GetYear() else yes;

#---Add code to convert underlying's (ETF) half gap to its future counterpart
#----------------------ETF Yesterdays close
def Prevclose = close(symbol, AggregationPeriod.DAY, "last") [1] ;

#---------------------- Spy Half gap calc
def HG_Conv = (Prevclose + SymbolData) / 2;

#---------------------- Half Gap CONVERSION CALCULATION
def HG = (ChartSymbol / SymbolData) * HG_Conv;
plot ETF = if RTHPlot and RTHPeriod then HG else Double.NaN;
ETF.SetPaintingStrategy(PaintingStrategy.DASHES);
ETF.SetDefaultColor(Color.PINK);
ETF.SetLineWeight(4);
#---End code to convert underlying's half gap to its future counterpart

#end

Reply With Quote
The following user says Thank You to AstroTuna for this post:


futures io Trading Community Platforms and Indicators ThinkOrSwim > ETF to Futures Half Gap


Last Updated on March 10, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1,800 in prizes!

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts