need help with a plot in EasyLanguage with knowledge of ThinkScript - EasyLanguage Programming | futures io social day trading
futures io futures trading


need help with a plot in EasyLanguage with knowledge of ThinkScript
Updated: Views / Replies:2,332 / 22
Created: by kidvic Attachments:2

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 donít 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
 2  
 
Thread Tools Search this Thread
 

need help with a plot in EasyLanguage with knowledge of ThinkScript

  #1 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received

need help with a plot in EasyLanguage with knowledge of ThinkScript

Does anyone know how to plot a HORIZONTAL line similar to the HIGHESTALL plot found in ThinkScript, and make it into easyLanguage?
ex.
plot priceLine = highestAll(if isNan(close[-1]) and !isNAN(close) then close else double.nan);

What this effectively does is create 1 and only 1 price level line.

Thanks and cheers!


Last edited by kidvic; May 18th, 2015 at 06:20 PM. Reason: Further clarification
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)
 Vendor: tradingcode.net 
The Netherlands
 
Futures Experience: None
Platform: MultiCharts, TradingView
Favorite Futures: ...
 
Jura's Avatar
 
Posts: 774 since Apr 2010
Thanks: 2,347 given, 661 received



kidvic View Post
Does anyone know how to plot a HORIZONTAL line similar to the HIGHESTALL plot found in ThinkScript, and make it into easyLanguage?
ex.
plot priceLine = highestAll(if isNan(close[-1]) and !isNAN(close) then close else double.nan);

What this effectively does is create 1 and only 1 price level line.

If this `highestAll()` function returns the highest price from all bars on the chart, I think you need to create a custom function for this that uses Symbol_High since that keyword is not limited by the indicator's MaxBarsBack value. You probably want to use a for loop to loop over all those `Symbol_High[]` values.

Drawing a horizontal trend line can be done with TL_New_s. The easiest way to do so is probably setting its time and date to the current bar and the previous bar, and then use the TL_SetExtLeft and TL_SetExtRight keywords to extend the trend line in both directions indefinitely. That saves you from having to update the trend line manually with each new price bar being formed. You would, however, need to check if the new price bars perhaps form a new high.

Reply With Quote
The following 2 users say Thank You to Jura for this post:
 
  #4 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received

Can you show me an example of trendline to extending from left to right from a high[3]?


Last edited by kidvic; May 19th, 2015 at 07:10 AM. Reason: Typo
Reply With Quote
 
  #5 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received


Jura View Post
If this `highestAll()` function returns the highest price from all bars on the chart, I think you need to create a custom function for this that uses Symbol_High since that keyword is not limited by the indicator's MaxBarsBack value. You probably want to use a for loop to loop over all those `Symbol_High[]` values.

Drawing a horizontal trend line can be done with TL_New_s. The easiest way to do so is probably setting its time and date to the current bar and the previous bar, and then use the TL_SetExtLeft and TL_SetExtRight keywords to extend the trend line in both directions indefinitely. That saves you from having to update the trend line manually with each new price bar being formed. You would, however, need to check if the new price bars perhaps form a new high.


Can you show me an example of trendline to extending from left to right from a high[3]?

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

kidvic,

something like this should get you going as an example:

 
Code
	TLID = TL_New( Date[3], Time[3], High[3], Date, Time, High[3] ) ;
		TL_SetExtRight( TLID, true ) ;
		TL_SetExtLeft( TLID, true ) ;
Regards,
ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #7 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received


ABCTG View Post
kidvic,

something like this should get you going as an example:

 
Code
	TLID = TL_New( Date[3], Time[3], High[3], Date, Time, High[3] ) ;
		TL_SetExtRight( TLID, true ) ;
		TL_SetExtLeft( TLID, true ) ;
Regards,
ABCTG

I tried it, it helps, but the result isn't giving me one line. instead it is plotting me the high of every candle instead of the high of 3 candles ago only.

vars: TLID (High[3]);

TLID = TL_New( Date[3], Time[3], High[3], Date, Time, High[3] ) ;
TL_SetExtRight( TLID, true ) ;
TL_SetExtLeft( TLID, true ) ;

This is the complete code I used. Am I missing something?

Reply With Quote
 
  #8 (permalink)
 Vendor: tradingcode.net 
The Netherlands
 
Futures Experience: None
Platform: MultiCharts, TradingView
Favorite Futures: ...
 
Jura's Avatar
 
Posts: 774 since Apr 2010
Thanks: 2,347 given, 661 received


kidvic View Post
I tried it, it helps, but the result isn't giving me one line. instead it is plotting me the high of every candle instead of the high of 3 candles ago only.

vars: TLID (High[3]);

TLID = TL_New( Date[3], Time[3], High[3], Date, Time, High[3] ) ;
TL_SetExtRight( TLID, true ) ;
TL_SetExtLeft( TLID, true ) ;

This is the complete code I used. Am I missing something?

You'll need to add a Boolean variable that acts as a check to see if the line has already been drawn or not. For example:

 
Code
vars: TLID (High[3]), IntraBarPersist alreadyPlotted(false);

if (alreadyPlotted = false) then begin
  
    TLID = TL_New( Date[3], Time[3], High[3], Date, Time, High[3] ) ;
		TL_SetExtRight( TLID, true ) ;
		TL_SetExtLeft( TLID, true ) ;
    
    alreadyPlotted = true;
    
end;

Reply With Quote
The following user says Thank You to Jura for this post:
 
  #9 (permalink)
Trading for Fun
Los Angeles, CA
 
Futures Experience: Intermediate
Platform: NinjaTrader, ThinkOrSwim
Favorite Futures: Options, Futures
 
Posts: 92 since Mar 2015
Thanks: 13 given, 2 received


Jura View Post
You'll need to add a Boolean variable that acts as a check to see if the line has already been drawn or not. For example:

 
Code
vars: TLID (High[3]), IntraBarPersist alreadyPlotted(false);

if (alreadyPlotted = false) then begin
  
    TLID = TL_New( Date[3], Time[3], High[3], Date, Time, High[3] ) ;
		TL_SetExtRight( TLID, true ) ;
		TL_SetExtLeft( TLID, true ) ;
    
    alreadyPlotted = true;
    
end;

It's finally only 1 line, however it is reading the wrong candle, and not candle 3 ago.

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


kidvic,

if you always want the trendline to mark the high three candles ago you'll have to update the trendline location every bar.
Look up TL_SetBegin and TL_SetEnd in the Tradestation help. This will show you how to change the start and end points for a trendline.

Regards,
ABCTG

Reply With Quote

Reply



futures io > > > > > need help with a plot in EasyLanguage with knowledge of ThinkScript

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
ATR Trailing Stop: Convert Thinkscript to Easylanguage kamisyed MultiCharts 7 March 31st, 2017 06:13 PM
Easylanguage: Function to Plot Text Verticaly nunoonline EasyLanguage Programming 2 December 22nd, 2010 06:17 AM
does this road to knowledge sound ok? micksta Beginners and Introductions 5 March 17th, 2010 02:13 AM
Does having some trading knowledge get in the way? shodson Psychology and Money Management 4 March 9th, 2010 04:27 PM
improve and train your knowledge wh Psychology and Money Management 0 September 12th, 2009 05:19 PM


All times are GMT -4. The time now is 10:37 PM.

Copyright © 2017 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 2017-12-11 in 0.12 seconds with 20 queries on phoenix via your IP 54.145.16.43