Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Profile: tedder87
About
User Name: tedder87
Groups: Gold User, Member, TeleChart
Rank: Registered User
Real Name:
Location
Occupation:
Interests:
Gender: Gender:
Statistics
Joined: Thursday, July 2, 2015
Last Visit: Saturday, January 14, 2017 9:28:52 PM
Number of Posts: 2
[0.00% of all post / 0.00 posts per day]
Avatar
Last 10 Posts
Topic: Is there anyway to return a value showing when the Moving Averages crossed? Want to use it as column
Posted: Monday, October 17, 2016 4:51:40 PM

Thanks - I didn't initially appreciate how well structured the nested parentheses are in these formulae.  Vey nicely done within the language set, and this definitely gives the correct answer.

This is a great tehcnique to know!

 

Topic: Is there anyway to return a value showing when the Moving Averages crossed? Want to use it as column
Posted: Sunday, October 16, 2016 9:35:33 PM

Bruce - thanks, these formulae helped in answering a similar question,  In my case, I was simply looking to determine whether a crossover had happened within a certain number of days,

For usiong this approach in a column value of a watch list, where the value is the number of days since the last crossover, there may be an error in this approach.  I haven't proven this yet, but let me give a hypothetical example.

Suppose the crossover occurred more than one time in the  period covered by the formula - say, for the 20 bar stochastic above.  If a crossover had occurred 5 days ago and 12 days ago, I believe the result would be 17, the sum of the two, not 5, which is the desired answer.

I haven't thought about this enough to come up with a solution (for that matter, like I said, I haven't even proven it's a problem, but I'm pretty confident it is).  Not sure if this can be done without an if/else or other conditional structure to bail out once the test condition has been met the first time, but I'll respond if I come up with something worthwhile.