NexusFi: Find Your Edge


Home Menu

 





Script with horizontal lines only on the current day


Discussion in ThinkOrSwim

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




 
Search this Thread

Script with horizontal lines only on the current day

  #1 (permalink)
TRSQ
Montpellier
 
Posts: 6 since Apr 2021
Thanks Given: 3
Thanks Received: 0

I've made this script where the horizontal
line should appear in the chart
,but it applies to all days i'd like to be
applied only on the current day.

def AP = AggregationPeriod.DAY;
def Priorclose = close(period = AP)[1];
def HighOfTheDay = high(period = AP);

plot Red = (HighOfTheDay + Priorclose) / 5 ;
plot green = (HighOfTheDay + Priorclose) *(0.7) ;

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
About a successful futures trader who didnt know anythin …
Psychology and Money Management
 
  #2 (permalink)
TRSQ
Montpellier
 
Posts: 6 since Apr 2021
Thanks Given: 3
Thanks Received: 0

ok seems i've found out how to do it

here is the script if someone is interested:


def day = getDay();
def lastDay = getLastDay();
def AP = AggregationPeriod.DAY;
def Priorclose = close(period = AP)[1];
def HighOfTheDay = high(period = AP);
def isToday = if(day == lastDay, 1, 0);

Plot Half = if isToday then (HighOfTheDay + Priorclose) / 5 else Double.NaN ;

Plot max = if isToday then (((HighOfTheDay - Priorclose)*(0.7))+ Priorclose) else Double.NaN ;

Reply With Quote




Last Updated on April 11, 2021


© 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