NexusFi: Find Your Edge


Home Menu

 





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


Discussion in TradeStation

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




 
Search this Thread

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

  #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 Given: 0
Thanks Received: 0

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

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Deepmoney LLM
Elite Quantitative GenAI/LLM
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
Battlestations: Show us your trading desks!
26 thanks
The Program
18 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

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




Last Updated on July 25, 2015


© 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