New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.
That may be more complicated than it needs to be. I think you can get similar results with
// bull flag
and [sma(30,close) > 5 days ago sma(30,close)] // trend is up - but look for strong slope, I would say and [close > sma(30,close)] // close is abv MA and [25 x Fast Stoch %K(10)] // close crossed into lower 25% of 10 day range (equivalent I think to close < high-.75 ATR)
//bear flag
and [sma(30,close) < 5 days ago sma(30,close)] and [close < sma(30,close)] and [ Fast Stoch %K(10) x 75] // close crossed into top 25% of 10 day range
The stock needs to be strongly trending for flags to work. Otherwise there is a good chance the flag will break down into a down leg. And then I would say on the bull flag you need a close above the lowest high, then enter above the high of that candle, if it happens. And I'm not sure I would wait to stop out below the low of the flag. If it doesn't take off from the suggested entry, it probably isn't going to work out. Vice versa for bear flags.
You should add Fast K to your chart with lines at 25 and 75 to verify the results.
You might also add a strong SCTR requirement, say SCTR > 80.
You should play with all the parameters to see how they affect the results.
P.S. I probably don't have to tell you this, but for others who might have followed the link: don't be swayed by board postings that say 'this works great, I made 10K last week'. Because this week or next week he could lose as much or more if the market changes. Everything works in some markets and fails in others. Test it out first to get a feel for when it works.
The code you linked to didn't specify a parameter for ATR( ), which suggests the underlying code is using the default, which I think is 14, but you can check that on TOS.
Comments
// bull flag
and [sma(30,close) > 5 days ago sma(30,close)] // trend is up - but look for strong slope, I would say
and [close > sma(30,close)] // close is abv MA
and [25 x Fast Stoch %K(10)] // close crossed into lower 25% of 10 day range (equivalent I think to close < high-.75 ATR)
//bear flag
and [sma(30,close) < 5 days ago sma(30,close)]
and [close < sma(30,close)]
and [ Fast Stoch %K(10) x 75] // close crossed into top 25% of 10 day range
The stock needs to be strongly trending for flags to work. Otherwise there is a good chance the flag will break down into a down leg. And then I would say on the bull flag you need a close above the lowest high, then enter above the high of that candle, if it happens. And I'm not sure I would wait to stop out below the low of the flag. If it doesn't take off from the suggested entry, it probably isn't going to work out. Vice versa for bear flags.
You should add Fast K to your chart with lines at 25 and 75 to verify the results.
You might also add a strong SCTR requirement, say SCTR > 80.
You should play with all the parameters to see how they affect the results.
P.S. I probably don't have to tell you this, but for others who might have followed the link: don't be swayed by board postings that say 'this works great, I made 10K last week'. Because this week or next week he could lose as much or more if the market changes. Everything works in some markets and fails in others. Test it out first to get a feel for when it works.