double up after 2 losses – but not 3!

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

    Hello all,

    I want to increase my position size from 1 to 2 after 2 losses only.. .if the 3rd bet losses (the increased size one), it should then go back to normal bet size

    I tried the code below, which works fine when there is 2 losses – the next bet has its position size increased – however when there are 3 or 4 losses in a row those are increased too.. then the next 2 wins are also increased.. why is this? I thought the “Positionperf(3)>=0” part would mean that if there are more than 2 losses in a row it would go back to original position size.

    any idea what i’ve done wrong?

    thanks

    ONCE OrderSize =1
    
    IF PositionPerf(1) < 0 AND PositionPerf(2) < 0 AND PositionPerf(3) >= 0 THEN
    OrderSize = 2
    ELSIF PositionPerf(1) > 0 THEN
    OrderSize =1
    ENDIF
    Screenshot-2017-03-01-08.59.20.png Screenshot-2017-03-01-08.59.20.png
    #26820 quote
    Nicolas
    Keymaster
    Master

    So, to be sure: if you lose 2 times in a row, your 3rd order is double size? If this 3rd order is a winner or a loser you go back to first lot size?

    #26830 quote
    Wing
    Participant
    Veteran

    Remove ‘once’ from ordersize=1 and it should work?

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

double up after 2 losses – but not 3!


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
verygrubby @verygrubby Participant
Summary

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

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