I’m new to all this, and trying to work out what some of the detail in the auto-generated code means.
In the section below, what exactly does the “[1]” bit mean at the end? Is it something to do with offsetting candles when deciding when to enter the trade?
Thanks for that. I have another question if you don’t mind :).
Im trying to trigger buys/sells when the price moves above/below the parabolic SAR. However, my attempt at the code (e.g. see below) seems to trigger buys at unexpected points – its certainly not doing what I hoped.
e.g. in the attached screenshot I would have expected a BUY at approx 8.08am (when price moved above the SAR, switching it to green) , and a SELL at approx 8.19am (when the price moved below the SAR, switching it to red)…. but its done something completely different (no BUY at 8.08, but a BUT at 8.19)…
any ideas what i’ve done wrong?
thanks
// Conditions to enter long positions
indicator1 = close
indicator2 = SAR[0.2,0.2,0.2]
c1 = (indicator1 CROSSES OVER indicator2[1])
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok