NexusFi: Find Your Edge


Home Menu

 





TOS Draw Horizontal Line at Current Price Indicator needed


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one brafra with 1 posts (0 thanks)
    2. looks_two Patrickology with 1 posts (0 thanks)
    3. looks_3 ceramictilepro with 1 posts (0 thanks)
    4. looks_4 DaveDoggyDogg with 1 posts (1 thanks)
    1. trending_up 12,378 views
    2. thumb_up 1 thanks given
    3. group 4 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

TOS Draw Horizontal Line at Current Price Indicator needed

  #1 (permalink)
 ceramictilepro 
Roseville CA
 
Experience: Advanced
Platform: N7
Broker: Amp Futures/CQG
Trading: ES
Posts: 124 since Jun 2009
Thanks Given: 32
Thanks Received: 21

Hello

I am looking for a simple indicator that draws a horizontal line across chart at current price.

very similar to the ninjatrader indicator


any help would greatly be appreciated.

I found this free TOS indicator online and it is real close to what I'm looking for but fails to draw across complete chart

 
Code
# Close Extended Line
# From within the script settings panel, change the value of lineLength to extend the line further if desired.

input lineLength = 4;
def barNumber = BarNumber();
def barCount = HighestAll(If(IsNaN(close), 0, barNumber));
def closeLine = if barNumber == 1 then Double.NaN else if barNumber == barCount - lineLength then close[-lineLength] else if barNumber == barCount then Double.NaN else closeLine[1];
plot data = closeLine;
     data.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
here is the link to the above code illustrating indicator in action
Fun with ThinkScript

thanks for any help

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Cheap historycal L1 data for stocks
Stocks and ETFs
REcommedations for programming help
Sierra Chart
 
  #2 (permalink)
 brafra 
munich germany
 
Experience: Beginner
Platform: NinjaTrader
Trading: ES
Posts: 3 since Jun 2016
Thanks Given: 0
Thanks Received: 0

In the meantime I have found a solution directly from NinjaTrader:
how do I draw a horizontal price line? - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

Here is the video that explains how to do it: 2015-08-06_0713 - NT_Paul's library

This works also in NT8.

Best regards

Reply With Quote
  #3 (permalink)
Patrickology
Tilburg
 
Posts: 2 since Oct 2017
Thanks Given: 0
Thanks Received: 0


Hi,

did you get it to work for TOS?

I tried something but it doesn't look like the one in the video..

Best regards,

Patrick

Reply With Quote
  #4 (permalink)
DaveDoggyDogg
Los Angeles,CA USA
 
Posts: 16 since Mar 2017
Thanks Given: 0
Thanks Received: 7

 
Code
plot priceLine = highestAll(if isNan(close[-1]) and !isNAN(close) then close else double.nan);

Reply With Quote
Thanked by:




Last Updated on December 20, 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