Hi,
I wish to code a function that buy when price goes down x % from the top (highest that day), and then up x % from the bottom (lowest that day) during the same day. But I can’t 🙂
So if price goes down 0,5% it should not buy direct, but wait for a 0,1% rise from the bottom that day.
The wait for a rise is just a try to protect from further downs – say price falls 0,5% but then continue to 0,9%.
Can I use DHigh(0)?
If close < DHigh(0) – x then… ?
if close > DLow(0) + x then
buy at market
endif
Endif
I will also probably use a time filter and maybe another price filter to determinate trend, but thats another story 🙂
Thanks!
All the best!
Simon