Possible to change horizontal lines based on time in EasyLanguage? (Cross posted) - futures io
futures io



Possible to change horizontal lines based on time in EasyLanguage? (Cross posted)


Discussion in TradeStation

Updated
    1. trending_up 1,167 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 1 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
 

Possible to change horizontal lines based on time in EasyLanguage? (Cross posted)

(login for full post details)
  #1 (permalink)
 jdwf16 
Fort Smith, Arkansas
 
Experience: Advanced
Platform: Tradestation
Broker: Tradestation, ToS
Trading: ES, NQ, CL, GC, EURUSD
 
Posts: 2 since Nov 2013
Thanks: 0 given, 0 received

I've coded an EasyLanguage indicator that draws horizontal lines at price levels based on an oscillator's extreme readings. Those horizontal lines accumulate over the life of the chart. I'd like to code in an automatic color control for those lines so that the most recent occurrences are one color and the older lines are another color. Thinking I'd like to have three time-bands with corresponding colors. Not to belabor this but, a plain language example would be that my chart would have three colors of horizontal lines. Blue would be the lines that were formed 6 months ago. Yellow would be the lines that formed between 3 and 6 months ago. Green would be the lines that formed within the past 3 months.

I'm having a tough time figuring out how to make that work. Changing line color is easy. Changing line color based on a specific time criteria throws me a curve ball. Any suggestions, snippets, advice, etc. would be greatly appreciated.

Started this thread Reply With Quote

Journal Challenge April 2021 results (now extended!):
Competing for $1800 in prizes from Jigsaw
looks_oneMaking a Living with the Microsby sstheo
(602 thanks from 60 posts)
looks_twoSalao's Journalby Salao
(147 thanks from 26 posts)
looks_3Learning to Profit - A journey in algorithms and optionsby Syntax
(112 thanks from 26 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(94 thanks from 30 posts)
looks_5Maybe a little bit different journalby Malykubo
(46 thanks from 29 posts)
 
Best Threads (Most Thanked)
in the last 7 days on futures io
I finally blew up an account
524 thanks
The Crude Dude Oil Trading System
72 thanks
Spoo-nalysis ES e-mini futures S&P 500
63 thanks
The tiyfTradePlanFactory indicator
25 thanks
Building a Crypto Mining Rig
18 thanks
 
(login for full post details)
  #2 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,244 since Apr 2013
Thanks: 417 given, 1,495 received

jdwf16,

depending on how you draw the trendlines you either need to store the time you draw the trendline or use the start date of the line to know the "age".
Now it's just a matter of cycling through the line IDs and checking the age to see if the color needs to be changed. The best way to do that would be to store the new trendline IDs in a collection or array and remove them from that collection once you changed the color.

Regards,
ABCTG

Follow me on Twitter Reply With Quote


futures io Trading Community Platforms and Indicators TradeStation > Possible to change horizontal lines based on time in EasyLanguage? (Cross posted)


Last Updated on July 25, 2015


Upcoming Webinars and Events

NinjaTrader Indicator Challenge!

Ongoing

Journal Challenge w/$1,800 in prizes!

May 7

The Cold Hard Truth: Maybe I Am Not Good Enough w/Chris Gray @ Earn2Trade

Elite only
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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