Basic question

Viewing 5 posts - 1 through 5 (of 5 total)
  • #9444

    Hello all,

    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?

     

    Much appreciated,

    Grubby

    #9454

    Hello, yes the number under brackets is the candlestick/period offset in the past.

    #9464

    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)…

    Screenshot-2016-06-16-18.18.12

    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])

    IF c1 THEN
    BUY 2 PERPOINT AT MARKET
    ENDIF

     

    #9469

    In your first code SAR parameter was (0.02,0.02,0.11), in 2nd post you’ve (0.2,0.2,0,2), is it correct?

    This is what I suggest to you, while price is under SAR, you set an STOP order at SAR price in order to be filled is price touch it.

    #9472

    Thanks Adolfo… i will give that a go

Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login