stop order opposite previous candle

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #15737 quote
    Opentrader
    Participant
    New

    Hi all

    Can some one help provide code a stop order placing that if the previous candle was a bull one then an sell order will be placed 5 pips below market price and opposite if the previous candle was a bear candle?

    Thanks

    #15744 quote
    Opentrader
    Participant
    New

    Ok worked it out – RE the candle – just want to know how you would do a stop order? Tried SELLSHORT 1 LOT AT MARKET + 4 but obviously not right

    #15745 quote
    Opentrader
    Participant
    New

    Think Ive got it –

    BUY 1 LOT AT close+10 - will test it out
    #15776 quote
    Opentrader
    Participant
    New

    Right so get an equity curve like this. Take it the backtest isn’t that realistic on proreal?

    2016-10-31_15-24-25.png 2016-10-31_15-24-25.png
    #15890 quote
    Nicolas
    Keymaster
    Master

    You need to set STOP pending order, you were close the good syntax:

    //long order
    BUY 1 LOT AT close+10 STOP 
    
    //short order
    SELLSHORT 1 LOT AT close-10 STOP 

    Keep in mind that pending orders need to be set at each candle (they always expire 1 bar later from the one where they were set).

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

stop order opposite previous candle


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Opentrader @opentrader Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by Nicolas
9 years, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/31/2016
Status: Active
Attachments: No files
Logo Logo
Loading...