Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

dpdez

Referencing Plot Points for Use in Trading Strategies

Recommended Posts

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?

TS window1.pdf

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites

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:

 

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 ;

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.