Tutorial 204 | Looking for conditions to occur within specified numbers of bars of each other
A Gold Pass asked for a tutorial about how to write a program that looked for three conditions to occur, in order. The first condition should occur, then the second condition should occur within a specified number of bars of the first. Finally a third condition would occur within a certain number of bars of the second.
The occurances being looked for in this show me study are a moving average cross over, a doji and and Bullish Harami. There was no particular logic in picking these specific conditions merely just a way of demonstrating this technique.
In this example the program looks for the moving average cross over. When it found it then looks for a Doji for the next 5 bars. If the Doji is found the program then looks for a Bullish Harami with the next 24 bars. The show me plots every time one of the conditions is found, a green dot for the average cross-over, a blue dot for a Doji and a red dot for a Bullish Harami.
In the strategy version a market order is made when the three conditions have occurred.
The way the program works is by using counters that continually increment. When one of the conditions occurs, the counter for that condition is reset to zero.
Note that the initial values for the counters are set to a level where a condition is erroneously recorded.
It is useful to create a show me study prior to a strategy to ensure that the program is working as anticipated.
-
7:24
Markplex
9 months agoTutorial 197 | Storing bar and analysis technique data in Excel
14 -
12:28
BSAbstracts
1 year agoCodeSpark Academy Puzzles | Level 5 | Conditionals | Learning Conditionals CodeSpark full Level Demo
7 -
14:38
VerrilloTrading
1 year agoSierra Chart Studies Performance | Automatic vs Manual Looping
2 -
9:20
The Excel Zone
1 year agoEXCEL TUTORIAL: MASTERING THE IF FUNCTION FOR DATA ANALYSIS - HOW TO SET MULTIPLE CONDITIONS
55 -
4:47
Nerdalific
1 year agoMS EXCEL Tutorial / Conditional Formatting / Cells That Contain...
-
6:09
The Excel Zone
1 year agoIFS EXCEL FUNCTION: THE EASIER WAY TO DO MULTIPLE CONDITIONS
59 -
14:29
CryBebe
1 year agoWHO IS NUMBER 2
4 -
33:15
Microsoft Excel Full Course
3 years agoExcel 365 Visual Basic Part 35 – If Statements#1
81 -
9:55
AndreJMcClendon
3 months agoHow To Program The Basic Conditions For A Beginners On MQL4 / MT4
69 -
13:32
Dr. Dons: Computer Architecture and Assembly Language
1 year ago3_4_ConditionCodes
1