Welcome to the Traders Laboratory Forums.
TradeStation Custom Programming Discuss projects, ideas, obstacles in programming with TradeStation.

Reply
Old 08-16-2011, 05:33 AM   #1

Join Date: Aug 2011
Posts: 2
Ignore this user

Thanks: 2
Thanked 0 Times in 0 Posts

Referencing Plot Points for Use in Trading Strategies

Hello All,
If anyone can shed some light on this little obstacle, I would be appreciative...

I am using a custom indicator based on the John Ehlers' sine wave. It essentially prints plot points on a chart representing support and resistance areas.

I am trying to write a strategy that essentially buys at open when support points have been plotted underneath - see graphic attached [The plot line 'Support' is printed at price 1113.50]

What is the specific syntax in EasyLanguage to reference an indicator's Plot points or its inputs?

I currently have:

If Price >= _BetterSineWave "Support" then...

However, EL requires a true/false expression where "Support" is typed.

Any ideas?
Attached Files
File Type: pdf TS window1.pdf (90.8 KB, 17 views)
dpdez is offline  
Reply With Quote
Old 08-16-2011, 10:49 AM   #2

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: Referencing Plot Points for Use in Trading Strategies

Quote:
Originally Posted by dpdez »
Hello All,
If anyone can shed some light on this little obstacle, I would be appreciative...

I am using a custom indicator based on the John Ehlers' sine wave. It essentially prints plot points on a chart representing support and resistance areas.

I am trying to write a strategy that essentially buys at open when support points have been plotted underneath - see graphic attached [The plot line 'Support' is printed at price 1113.50]

What is the specific syntax in EasyLanguage to reference an indicator's Plot points or its inputs?

I currently have:

If Price >= _BetterSineWave "Support" then...

However, EL requires a true/false expression where "Support" is typed.

Any ideas?
don't spin your wheels
go get the ebook... getting started with EasyLanguage
go through the examples, everything you need is there.


ps. your question is too vague. I can see what you are trying to accomplish, but you have to give more info (eg code snippets).
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
dpdez (08-17-2011)
Old 08-17-2011, 12:21 AM   #3

Tradewinds's Avatar

Join Date: Nov 2008
Location: Northeast U.S.
Posts: 891
Ignore this user

Thanks: 373
Thanked 231 Times in 164 Posts
Blog Entries: 6

Re: Referencing Plot Points for Use in Trading Strategies

Quote:
Originally Posted by dpdez »
What is the specific syntax in EasyLanguage to reference an indicator's Plot points or its inputs?
EL can call functions. If you open up EasyLanguage, and load a strategy, there are built in strategies for reference. Here is an example of one:

Code:
inputs:
	BollingerPrice( Close ),
	TestPriceLBand( Close ), { cross of this price over LowerBand triggers placement
	 of stop order at LowerBand }
	Length( 20 ),
	NumDevsDn( 2 ) ;

variables:
	LowerBand( 0 ) ;

LowerBand = BollingerBand( BollingerPrice, Length, -NumDevsDn ) ;

if CurrentBar > 1 and TestPriceLBand crosses over LowerBand then
{ CB > 1 check used to avoid spurious cross confirmation at CB = 1 }
	Buy ( "BBandLE" ) next bar at LowerBand stop ;
	{ ie, don't buy if next bar completely below current LowerBand, but wait for next 
	  crossing condition - an example of a non-persistent setup triggering a stop
	  order that is replaced until hit }


{ ** Copyright (c) 2001 - 2010 tradestation Technologies, Inc. All rights reserved. ** 
  ** tradestation reserves the right to modify or overwrite this strategy component 
     with each release. ** }
Notice this line:

LowerBand = BollingerBand( BollingerPrice, Length, -NumDevsDn ) ;

BollingerBand is a function. If the code you need to reference is now saved as an indicator, you may need to put the code into a function, and configure it as a function. Either that, or duplicate the code in the strategy.

var: Support(0);

Support = _BetterSineWave(Price, Length);

If Price >= Support then Buy("Buy Support") next bar at open ;
__________________
Precise, "dialed-in", targeted combination setups, like opening a combination lock; is the experience you should be having while trading. Dial left, right, left, . . . click - the lock opens.
Tradewinds is offline  
Reply With Quote
The Following User Says Thank You to Tradewinds For This Useful Post:
dpdez (08-17-2011)

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trading with Market Statistics V. Other Entry Points jperl Market Profile 88 10-21-2011 12:08 AM
Simple Forex Trading Strategies - The Key To Profitable Trading Nial Fuller Trading 3 10-26-2010 12:12 AM
Solution for Referencing Multiple Symbols and Timeframes robertm Coding Forum 0 10-14-2010 11:22 AM
Referencing Previous Pivot Hi/lo in TS blib Coding Forum 1 04-05-2009 05:48 AM
Easylanguage: Plot Points at the Extremes of High / Low nuno-online Swing Trading and Position Trading 13 02-17-2009 09:22 PM

All times are GMT -4. The time now is 09:59 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.