TradeStation EasyLanguage quick-tip 65 | Number of bars after cross
Quick-tip 65 demonstrates two simple of ways of finding and showing when a condition on the chart has occurred within a user input number of bars.
The quick-tip shows two ways that this can be programmed. The condition used to facilitate the demonstration is the cross of a fast moving average over a slow moving average.
Using a counter
This first technique is used in the TradeStation indicator: _Quick-tip65-Counter. In this program a counter indicator is incremented by one every bar. When the fast moving average crosses over a slow moving average the counter is reset to zero. The program draws an asterisk when the value of the counter is less than a user input value, i.e. when the cross had occurred less that that number of bars ago.
Setting a variable
In the second technique (_Quick-tip65-Condition) a variable is set to a value of 1 every time the fast moving average crosses over a slow moving average, otherwise is is set to zero. The summation function is used to check whether the sum of this variable over the user input number of bars is greater than zero. If so an asterisk is drawn on the chart.
In this example, the asterisks are displayed vertically.
-
LIVE
Habibi Bros.
4 hours agoThe Broletariat | Habibi Power Hour #221
945 watching -
LIVE
Due Dissidence
8 hours agoDana Bash SMEARS Protesters, ORWELLIAN Speech Bill PASSES House, Columbia Fallout - w/ Prof. Zenkus
2,958 watching -
LIVE
Melonie Mac
3 hours agoGo Boom Live Ep 2: Lara Croft Wokeover and More!
1,706 watching -
1:08:49
The Late Kick with Josh Pate
5 hours agoLate Kick Live Ep 509: Deion & Colorado | Transfer Portal Apology | Underrated Teams | CFP Issues
12.9K1 -
LIVE
The Anthony Rogers Show
11 hours agoEpisode 304 - Let's Solve Homelessness
481 watching -
1:01:39
The StoneZONE with Roger Stone
7 hours agoIs Jack Smith's Appointment Even Legal? Trump Impeachment Lawyer David Schoen Enters The StoneZONE!
23.5K17 -
1:07:02
Donald Trump Jr.
10 hours agoBiden Moves US Closer to a Military Draft, Ric Grenell Explains Why, Plus the Jack Smith Scandal You Haven’t Heard About | TRIGGERED Ep.133
91.5K120 -
1:42:45
The Quartering
7 hours agoThe Bible Now Illegal In America, Another Boeing Whistleblower Disappears, Hero College Bros
59.8K64 -
50:08
Kimberly Guilfoyle
9 hours agoSPIES, LIES, AND DEEP STATE CRIMES: CIA Spying Scandal, Plus the Swamp’s Gaza Refugee Disaster, Live with Rep Matt Gaetz and Russ Vought | Ep. 122
55.7K77 -
1:09:49
Redacted News
8 hours agoBREAKING!! What Are THEY trying to hide? | Redacted with Natali and Clayton Morris
111K187