NexusFi: Find Your Edge


Home Menu

 





Displaying Range of First Bar of Day


Discussion in ThinkOrSwim

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




 
Search this Thread
  #1 (permalink)
sat1234
North Vancouver BC Canada
 
Posts: 1 since Nov 2010
Thanks Given: 1
Thanks Received: 0

I would like to display the range (High-Low) of the first bar of the trading day
on a 5 minute TOS chart. I would also like to add a user option to display the range
of the first 3 bars of the trading day as an alternative if it's possible. I know how to
display the result, I just need to know what script to use to identify the range for the
first bar or first 3 bars. I appreciate any suggestions.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Hormuz Surges From 14% to 26.5% Intraday as Irans Answer …
Prediction Markets & Event Contracts
After $87M Settles NO: Irans Nuclear Redline Sets Up the …
Prediction Markets & Event Contracts
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
CFTC Workforce Shrinks 24% to 15-Year Low While Predicti …
Traders Hideout
 
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)
musofir
Russia.Kazan.Butlerova str.
 
Posts: 1 since Jul 2012
Thanks Given: 0
Thanks Received: 1


sat1234 View Post
I would like to display the range (High-Low) of the first bar of the trading day
on a 5 minute TOS chart. I would also like to add a user option to display the range
of the first 3 bars of the trading day as an alternative if it's possible. I know how to
display the result, I just need to know what script to use to identify the range for the
first bar or first 3 bars. I appreciate any suggestions.

def na=double.nan;
input ORBegin = 0930;
input OREnd = 0935;
input ShowTodayOnly={"No", default "Yes"};
def s=ShowTodayOnly;
Def ORActive = if secondstilltime(OREnd)>0 AND secondsfromtime(ORBegin)>=0 then 1 else 0;
def today=if s==0 OR getday()==getlastday() AND secondsfromtime(ORBegin)>=0 then 1 else 0;
Rec ORHigh = if ORHigh[1]==0 or ORActive[1]==0 AND ORActive==1 then high else if ORActive AND high>ORHigh[1] then high else ORHigh[1];
Rec ORLow = if ORLow [1] ==0 or ORActive [1] ==0 AND ORActive ==1 then low else if ORActive AND low < orlow [1] then low else ORLow [1];
Def ORWidth = ORHigh - ORLow;
Plot ORH=if ORActive OR today<1 then na else ORHigh;
Plot ORL=if ORActive OR today<1 then na else ORLow;
ORH.setdefaultcolor(color.green);
ORH.setStyle(Curve.FIRM);
ORH.setlineweight(3);
ORL.setdefaultcolor(color.red);
ORL.setStyle(Curve.FIRM);
ORL.setlineweight(3);


Reply With Quote
Thanked by:




Last Updated on May 15, 2013


© 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