I’d be really grateful for any assistance as to why this simple code doesn’t work. Above is a screen shot of the eur/usd showing 4 green bars followed by a very long one. All I want the code to do is detect 3 consecutive green bars – the final one of which is a large multiple of the one before – e.g. 5x then sell. Thanks all Linden
c1 = (Close[1] - Open[1]) > 5*(Close[2] - Open[2])
c2 = (Close[3]) > Open[3] )
IF c1 and c2 THEN SELLSHORT 1 lot at market
endif
Hi stratus,
Not tested, but it would operate properly I believe:
c1 = summation[4](close>open)=4
c2 = range>range[1]*5
if c1 and c2 then
SELLSHORT 1 LOT AT MARKET
endif
Many thanks Nicolas, this works well.