Price cross level, multiple times - intrabar
-
Hi,
Can you please tell me how I can (see attached drawing) ,
Picture title : Price cross level – Multiple times – Intrabar
I want to buy every time the price line cross a price level (up, in this case).
This will happen many times within one time bar.
[Red circle in picture, one time bar, shows when to buy].
Picture title: Price moves above current high - Multiple times – Intrabar
I want to buy every time the price move 0.5 pip above the current high.
This can happen many times within one time bar.
[Red circle in picture, one time bar, shows when to buy].
thanks ,
......
Price moves above current high - Multiple times – Intrabar.jpg
Price cross level – Multiple times – Intrabar.jpg -
For the first request, for what period do you talking about? And how many timed in a bar the crossover should be detected - once, or more than once?
Little theory here: http://fxdreema.com/documentation/proje ... er%20works
For crossover you need the current price and some price from the past. This past price can be Close price from the previous M1 candle. Check "Price vs Indicator crossover" example in http://fxdreema.com/examplesThere is a block named "Signals (flip-flop)" that is almost like "Condition", but little different and it can be used here I think.
For second request, some kind of memory should be used, and in this example (http://fxdreema.com/shared/9V8afS08b) I use Formula Result. When Formula block is used, it automatically creates a global variable (Result) that can be read and modified everywhere into the project. In the case, when the price rise above the variable, the variable is modified to the next level above (15 pips added). I used 15 pips because I prefer bigger values for backtest.