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.

nab999

Entry Off Trigger Bar

Recommended Posts

Hi All,

 

I am struggling to code the following for TS 8.6.....

 

I have a simple moving average cross over system.

 

The bar on which the averages cross should be deemed to be the Trigger Bar, i.e. fast average crosses over slow average, then this bar = Trigger Bar.

 

What I am trying to do is then set an entry, which would be to enter at the high of the trigger bar plus 50% of the range of the trigger bar.

 

The if the order is not filled within 5 bars, cancel the order,

 

Below is a mix of the EL code and statements of what I want the code to do.

 

Many thanks for all your continued help guys, it has been a massive help to me as an easy language newbee.

 

Input: SlowLength(20), FastLength(60);

 

Var: Value1=average(close, slowlength);

Value2?Average(close, fastlength);

 

If Value1[1]<Value2[1] and Value1>Value2 then begin

 

This bar = Triggerbar;

End;

 

Value3=Range of TriggerBar / 100 * 50;

Value4=High of TriggerBar+Value3;

 

If TriggerBar[0] or If TriggerBar[1] or TriggerBar[2] Or TriggerBar[3] or TriggerBar[4] or TriggerBar[5] then begin

 

Buy next bar at Value4 stop;

End;

Share this post


Link to post
Share on other sites

... a chart,

 

with lines and arrows... pointing to the trigger points,

 

and notes,

 

describing your thoughts on how and why it triggers,

 

will always help you see through the smoke and noise.

 

 

 

 

p.s. one tip: when you are describing the trigger point,

always make observation (and notes) on the bar before, and the bar after.

this exercise you will help see your logic emphasized, clarity enhanced, and confirmation reiterated.

Share this post


Link to post
Share on other sites

Hi 3monkeys, many thanks for your reply.

 

Could you tell me how to alter the entry please.

 

With the above code the entry is the high of the trigger bar + x number of points.... what I am looking for is to have the entry price at the high of the trigger bar, plus 50% of the range of the trigger bar.

 

Again, many thanks.

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.