Waiting after a loss

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #26674 quote
    verygrubby
    Participant
    Master

    Hello all,

    Is there a way to tell a strategy to wait before opening a new trade after a loss? e.g. If a bet loses, I want my strategy to wait 10 minutes before considering entering a trade again (i.e. it should ignore any trade signals that might occur in that 10 minute period)

    Many thanks

    Geoff

    #26739 quote
    Big Hug
    Participant
    Average

    Hi Geoff

    I’m just about to go out but you could try something like this ..this uses the bars as the time and looks to enter once the price has moved a certain distance from the first entry…

    IF c1 AND NOT LongOnMarket THEN
    BUY 2 PERPOINT AT MARKET
    ENDIF
    
    //let's add another order while price continue to move lower (more than 10 points) than the last order taken with a condition of 5 bars elapsed since then
    IF BARINDEX-TRADEINDEX(1)>20 AND Close-TRADEPRICE(1)>20 AND LongOnMarket THEN
    BUY 2 PERPOINT AT MARKET
    ENDIF
    #26760 quote
    Nicolas
    Keymaster
    Master

    You can use BARINDEX and TRADEINDEX like Big Hug said in his previous post. You can also make comparison between schedules if you store “time” in a variable, when you launch an order.

    #26763 quote
    verygrubby
    Participant
    Master

    thanks guys…will try that

    #26775 quote
    Big Hug
    Participant
    Average

    “You can also make comparison between schedules if you store “time” in a variable, when you launch an order”

    Hi Nicolas –

    Are you referring to

    indicator3 = //whatever your condition is
    c3 = (indicator3 >=  X )AND TIME >090000 AND TIME <200000

    If not – I wondered if you could post an example of the  code when you have a moment

    …Thanks in advance

    #26801 quote
    Nicolas
    Keymaster
    Master

    @Big Hug

    You can give a try with this code snippet for instance:

    if buycondition and minute-lasttime>10 or minute-lasttime>-50 then 
     lasttime = minute 
     buy 1 contract at market 
    endif 
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Waiting after a loss


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
verygrubby @verygrubby Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/28/2017
Status: Active
Attachments: No files
Logo Logo
Loading...