Basic Search

Basic Search

Basic Site Search




We speak

 Contact me for Custom work
or One on One Platform Instruction 

follow me on: 


Have I crossed the line?

In Prodigio the obvious choice of finding out if a line has been crossed is to use one of the crossing nodes. But in the past we have found that these nodes could possibly miss a signal  if price gaps across the line.



The next obvious choice is to use Boolean logic to test if a line has been crossed.  Here you use a "Greater Than" or "Less Than" tests to see if you are first on one side of the line with the previous bar then test for the opposite condition to see if you have crossed the line.

This method may be more verbose but it is a surefire method of checking for a cross condition on a line.  

You might want to consider changing the "Less Than" condition to "Less Than or Equal" to node to account for the possibility of the bar closing exactly on the line.

I've come across a third way to do this that may have an additional advantage of helping to filter for some chop.  Here you set up one Boolean test for your line and use it to set a Flag node to true and then use the same test to reset the flag if it is been true within a certain period.  Here the flag would reset if price was above the line within the last two bars.

This can be simplified a bit by saving out the test condition into a sub-rule and using it twice in the main rule like this.

this method gives you a lot of control and by allowing you to specify how many bars that price is below the line before it signals a cross you can make sure that you are in a trend going across the line and not just bouncing back and forth across online giving you a constant stream of signals

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.
Member Account Required
You must have a member account on this website in order to post comments. Log in to your account to enable posting.
« Trailing Stops, Roll your own! | Preview of the Strategy Lab in the Wizards Lair »