Can a "last theoretical closed trade" test be done in FXDreema?
-
I'm preparing myself for a "dude, just hire a programmer" answer, but I'm trying to figure out how I can automate the "last theoretical closed trade" test as one of my conditions to buy. Simply put, I know the traditional use of a condition block to determine when the current ask price goes above some level (like when the current price crosses above an indicator) to trigger a buy signal, but is it possible to identify conditions that already took place in the past and then use that information to make a current buying decision?
As an example, is it possible to use FXDreema to identify the most recent touch of a line (in the past), then the most recent touch of the opposite line (in the past) and then the next touch of the opposite line (in the past). Something like below:

I know this doesn't sound trivial, so any advice pointing me in the right direction would be much appreciated...even if that advice is "dude, just hire a programmer"
-
@MTAB
Sure you can try looping back the candle to see if the condition is satisfied.In case of touching from above, use 2 bool variables to denote the candle status. One for the candle above the indicator line, another for candle cut the line
-
Thank you @sktsec ! I really appreciate your advice. Can you explain in a little more detail what you mean? I think I understand what you mean about using 2 bool variables (one for when the price is above the upper line and one for when it is below that line), so would you then store that value for the "above the upper line" candle ID into a variable?
-
@MTAB You can create a loop as sktsec suggested (difficult option) or you can also check (less difficult option) that info as new candles are created. I mean, every time a candle is closed, check if that condition is true or now. If it is true, store the value into a variable. Unless there is a new value to overwrite in the future, you already got the info you need in 10, 20 or 100 candles ahead.
-
Thank you @l'andorra! So there is no way to get that information from the past, and instead you have to start with the current information and start to accumulate the information you want. I was hoping there was a way to get the past information using the EA. Thank you both!
-
@MTAB
You are welcome. BUT don't give up. I've done a demo for youhttps://fxdreema.com/shared/Qu97vlFuc
It gives you the bar number (Candle ID) of the bar touch from above.
Check, modify and see if you can get what you want.
If you can get the first touch bar number, the second is simple. Just repeat the block with the starting bar = first touch bar number + 1
-
Wow, @sktsec, I am truly appreciative of you taking so much time to help me with this. I'm a relatively new programmer (@l-andorrà is an incredible teacher) so it might take me some time to figure out exactly what your demo is doing and how I can modify it to try and get my results. I will keep you both updated!! Have a great weekend and truly thanks again to you both!
-
@MTAB No. No- I didn't say there is now way. I said it is MORE complicated. Just that.
