NexusFi: Find Your Edge


Home Menu

 





EasyLanguage trendline in space to right of chart


Discussion in TradeStation

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




 
Search this Thread

EasyLanguage trendline in space to right of chart

  #1 (permalink)
fknell123
london uk
 
Posts: 1 since May 2012
Thanks Given: 0
Thanks Received: 0

Hi all,
I want to draw a bunch of trendlines from the last bar on the chart, extending them 'x'-bars (a number computed from another process) into the future i.e. the space to the right of the chart.

I can draw a trendline using EL:
 
Code
tlid  = TL_New(Date[0], Time[0], price, Date[_end], Time[_end], price);
But, the '_end' is in the space to the right, or the limit of the available space (whichever is smaller), found using:

 
Code
GetAppInfo( aiSpaceToRight )
Using negative indexes doesn't work for me.


How can I achieve this please?

Alf.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to apply profiles
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
ZombieSqueeze
Platforms and Indicators
 
  #2 (permalink)
 Dannemand   is a Vendor
 
Posts: 10 since Jul 2022
Thanks Given: 9
Thanks Received: 6

Hi Alf,

TradeStation is limited to trendline Start and End points within the "currently drawn chart", which means no further right than the last bar on the chart PLUS the number of bars specified as Space to the right under Customize Window for that chart window. See attached screenshot.

To get the rightmost bar available for Start/End points, use GetAppInfo(aiRightDispDateTime)

To extend trendlines beyond that point, all the way to the right edge of the chart window, use the Extend Right feature. For old style trendlines created using TL_New, use TL_SetExtRight to enable/disable this on a given trendline.

 
Code
tlid  = TL_New(Date[0], Time[0], price, Date[_end], Time[_end], price);
TL_SetExtRight(tlid, TRUE);

For more complete control of TrendLines in EasyLanguage (including control of labels as well as the ability to "persist" when drawn on intrabar ticks) I recommend using the newer Object Oriented versions of Trendlines (OOEL).

Attached Thumbnails
Click image for larger version

Name:	TS10 - Space to the right - 2022-07-22.png
Views:	82
Size:	20.8 KB
ID:	326017  
Reply With Quote
  #3 (permalink)
SunTrader
Boca Raton, FL
 
Posts: 260 since Nov 2018
Thanks Given: 81
Thanks Received: 182


Now if only we could get TradeStation to allow for more than 999 bars to the right since Globex+RTH equals 1380 bars on a 1 minute chart.

Reply With Quote
  #4 (permalink)
 Dannemand   is a Vendor
 
Posts: 10 since Jul 2022
Thanks Given: 9
Thanks Received: 6


SunTrader View Post
Now if only we could get TradeStation to allow for more than 999 bars to the right since Globex+RTH equals 1380 bars on a 1 minute chart.

Surely there is something I am missing here: I am scratching my head, trying to come up with a single reason why anybody would ever do that.

I have most of my charts set to 14 bars to the right, mostly to allow for right-justified price labels without obscuring the bars, but also to leave a little room for visualization. See attached screenshot.

I know some who prefer 30 bars or more for visualization. But 999 would mean scrolling many pages to the left before I can see any bars.

Please enlighten me?

Attached Thumbnails
Click image for larger version

Name:	TS10 - CL - Swing Strict - 2022-08-09.png
Views:	86
Size:	225.4 KB
ID:	326514  
Reply With Quote
  #5 (permalink)
SunTrader
Boca Raton, FL
 
Posts: 260 since Nov 2018
Thanks Given: 81
Thanks Received: 182


Dannemand View Post
Surely there is something I am missing here: I am scratching my head, trying to come up with a single reason why anybody would ever do that.

I have most of my charts set to 14 bars to the right, mostly to allow for right-justified price labels without obscuring the bars, but also to leave a little room for visualization. See attached screenshot.

I know some who prefer 30 bars or more for visualization. But 999 would mean scrolling many pages to the left before I can see any bars.

Please enlighten me?

Projected back from Tomorrow's (still to come) opening bar. That is saved from months ago, not current prices obviously:-


Reply With Quote
  #6 (permalink)
 Dannemand   is a Vendor
 
Posts: 10 since Jul 2022
Thanks Given: 9
Thanks Received: 6


SunTrader View Post
Projected back from Tomorrow's (still to come) opening bar. That is saved from months ago, not current prices obviously:-

Thank you!

I always tell clients and new traders there are a thousand ways to skin a cat, and anybody who tells them their way is the only way to trade (or even the best way) probably don't know what they're talking about.

What you showed here is something I never though of, but I absolutely see what you mean.

Reply With Quote
  #7 (permalink)
SunTrader
Boca Raton, FL
 
Posts: 260 since Nov 2018
Thanks Given: 81
Thanks Received: 182


Dannemand View Post
Thank you!

I always tell clients and new traders there are a thousand ways to skin a cat, and anybody who tells them their way is the only way to trade (or even the best way) probably don't know what they're talking about.

What you showed here is something I never though of, but I absolutely see what you mean.

And from someone who back in the day didn't know the difference between Geometry and a Geo Metro.

Reply With Quote
Thanked by:
  #8 (permalink)
 Dannemand   is a Vendor
 
Posts: 10 since Jul 2022
Thanks Given: 9
Thanks Received: 6


SunTrader View Post
And from someone who back in the day didn't know the difference between Geometry and a Geo Metro.

LOL 😁

Consistently profitable trading is one of the most challenging endeavors. As it should be, since otherwise everybody would do it -- in which case it would stop working.

And certainly it (trading) is an endeavor where academic background has little bearing on one's success.

Reply With Quote
Thanked by:




Last Updated on August 21, 2022


© 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