Coding trendlines in easylanguage - EasyLanguage Programming | futures io social day trading
futures io futures trading


Coding trendlines in easylanguage
Updated: Views / Replies:744 / 8
Created: by timtasmania Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you dont need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 
Thread Tools Search this Thread
 

Coding trendlines in easylanguage

  #1 (permalink)
Trading Apprentice
Trento, Italy
 
Futures Experience: Intermediate
Platform: Tradestation
Favorite Futures: CL, SI
 
Posts: 4 since Oct 2017
Thanks: 1 given, 0 received

Coding trendlines in easylanguage

Hi,

Im trying to code trend lines into easylanguage so they appear on the charts in TS2000i and am having problems.

It should (I think) in theory be super simple for someone who actually knows what theyre doing..so thought Id ask for help and try to lose this headache

Basically I would like:

1. A line which connects the close of today (latest bar on chart) with the close of 21 days ago.
2. A line which connects the close of 21 days ago with the close of 42 days ago.
3. A horizontal line at the highest high of the past 21 days (it would go from today back 21 days)
4. A horizontal line at the lowest low of the past 21 days (it would also go from today back 21 days).

These lines would obviously then update automatically every time new data is entered & the chart updates.

Many many thanks for anyone willing to help me out!

All the best,
Tim

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,658 since Apr 2013
Thanks: 250 given, 950 received
Forum Reputation: Legendary


Hi Tim,

if you post the code that is giving you problems, I am sure someone here is able to steer you in the right direction.

In general I'd suggest to create the trendlines once and then just update their location. Getting the prices will depend a bit on the timeframe that you are working on, though.

Regards,

ABCTG

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
Trento, Italy
 
Futures Experience: Intermediate
Platform: Tradestation
Favorite Futures: CL, SI
 
Posts: 4 since Oct 2017
Thanks: 1 given, 0 received

Thanks for the reply ABCTG.

To be honest I've never coded any trend lines and reading through the TS manual and searching google hasn't helped much, at least not for the types of (trend) lines I want coded... I'm stuck before I've started!

I can of course persevere and try to come up with something which resembles the code but thought I'd see if anyone could get me started more easily on this forum and save me a bunch of time.

Thanks again.

Cheers,
Tim

Reply With Quote
 
  #5 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,658 since Apr 2013
Thanks: 250 given, 950 received
Forum Reputation: Legendary

Tim,

the first thing to consider is the timeframe you are working on. If you are only using daily bars you can simply back reference the Open, High, Low and Close of a bar to get the values from X bars ago. In case you are working on intraday data, this won't work and you need to track the values from X days ago (using an array for example).

Regards,

ABCTG

Reply With Quote
 
  #6 (permalink)
Trading Apprentice
Trento, Italy
 
Futures Experience: Intermediate
Platform: Tradestation
Favorite Futures: CL, SI
 
Posts: 4 since Oct 2017
Thanks: 1 given, 0 received

HI ABCTG,

I'm just using daily bars. I'll try to keep searching and come up with something which resembles a workable code.

Thanks.


ABCTG View Post
Tim,

the first thing to consider is the timeframe you are working on. If you are only using daily bars you can simply back reference the Open, High, Low and Close of a bar to get the values from X bars ago. In case you are working on intraday data, this won't work and you need to track the values from X days ago (using an array for example).

Regards,

ABCTG


Reply With Quote
 
  #7 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,658 since Apr 2013
Thanks: 250 given, 950 received
Forum Reputation: Legendary

Tim,

in that case you can access the values from previous day's easily by back referencing them - for example Close[10] would be the Close of the bar ten bars to the left of the current bar (Close[0] is the current bar).
Look into the functions "highest" and "lowest" to get the highest/lowest value within the last X bars.

For the trendlines I would suggest to create the four trendlines once at CurrentBar = 1 and then just update the trend line start and end points.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #8 (permalink)
Trading Apprentice
Trento, Italy
 
Futures Experience: Intermediate
Platform: Tradestation
Favorite Futures: CL, SI
 
Posts: 4 since Oct 2017
Thanks: 1 given, 0 received


ABCTG View Post
Tim,

in that case you can access the values from previous day's easily by back referencing them - for example Close[10] would be the Close of the bar ten bars to the left of the current bar (Close[0] is the current bar).
Look into the functions "highest" and "lowest" to get the highest/lowest value within the last X bars.

For the trendlines I would suggest to create the four trendlines once at CurrentBar = 1 and then just update the trend line start and end points.

Regards,

ABCTG

Hi ABCTG,

I'm not sure how exactly...but I've managed to code it. It seems to all be working fine but obviously time will tell...

Many thanks for your help.

Regards,
Tim

Reply With Quote
 
  #9 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,658 since Apr 2013
Thanks: 250 given, 950 received
Forum Reputation: Legendary

Hi Tim,

you are welcome. Feel free to post your code here as it might help others or another pair of eyes might spot something.

Regards,

ABCTG

Reply With Quote

Reply



futures io > > > > > Coding trendlines in easylanguage

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Scott Hodson: Bitcoin and Cryptocurrency Trading Strategy

Elite only

Ran Aroussi: Python and Machine Learning (part 4) [special time 11AM ET]

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Doubts about easylanguage coding Malqpor MultiCharts 4 August 15th, 2015 08:12 AM
Need Help EasyLanguage Coding kinkeadfx EasyLanguage Programming 5 July 6th, 2014 03:51 PM
Good resource for easylanguage coding in strategies (trailing stops/ b/e etc.) greenroomhoo MultiCharts 9 February 3rd, 2012 08:03 AM
re coding for entry/exits in easylanguage baz111 EasyLanguage Programming 1 December 28th, 2011 06:17 AM
RE Easylanguage statement for coding price baz111 EasyLanguage Programming 2 December 26th, 2011 10:07 AM


All times are GMT -4. The time now is 06:31 PM.

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, 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
Page generated 2018-04-20 in 0.12 seconds with 19 queries on phoenix via your IP 54.224.234.8