The classical Martingale : what we should exactly NOT do !

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #63813 quote
    JohnScher
    Participant
    Veteran

    For example, I changed Nikolas’ code a little bit and see a profit of 133 Euro since April 2017.

    //-------------------------------------------------------------------------
    // Hauptcode : M11 = 1H breaktout 100000 (M)
    //-------------------------------------------------------------------------
    Defparam cumulateorders = false
    
    
    Ordersize  = 1
    
    
    if Time = 100000 then
    
    haut = highest[6](high)
    bas = lowest[6](low)
    amplitude = haut - bas
    achat = 0
    vente = 0
    endif
    
    
    if Time > 100000 AND Time <= 180000 THEN
    IF achat = 0 THEN
    IF PositionPerf(1) < 0 THEN
    OrderSize = OrderSize+1
    if ordersize<1 then
    ordersize=1
    ENDIF
    ELSIF PositionPerf(1) > 0 THEN
    OrderSize =1
    if ordersize<1 then
    ordersize=1
    ENDIF
    endif
    buy Ordersize share at haut stop
    ENDIF
    IF vente = 0 THEN
    OrderSize = OrderSize+1
    if ordersize<1 then
    ordersize=1
    ENDIF
    ELSIF PositionPerf(1) > 0 THEN
    OrderSize =1
    if ordersize<1 then
    ordersize=1
    ENDIF
    sellshort ORdersize share at bas stop
    ENDIF
    ENDIF
    
    If longonmarket THEN
    achat = 1
    ENDIF
    
    IF shortonmarket THEN
    vente = 1
    ENDIF
    
    set stop ploss amplitude
    set target pprofit amplitude
    

     

    SineWave

    #80063 quote
    conwol
    Participant
    New

    Hi,

    Interesting code, but for some reason it only takes max 2 contracts after losses when I run it on DAX. Is it taking larger positions that than for you?

Viewing 2 posts - 16 through 17 (of 17 total)
  • You must be logged in to reply to this topic.

The classical Martingale : what we should exactly NOT do !


General Trading: Market Analysis & Manual Trading

New Reply
Author
author-avatar
Doctrading @doctrading Participant
Summary

This topic contains 16 replies,
has 6 voices, and was last updated by conwol
7 years, 5 months ago.

Topic Details
Forum: General Trading: Market Analysis & Manual Trading
Language: English
Started: 05/30/2016
Status: Active
Attachments: 5 files
Logo Logo
Loading...