A little help for this strategy that works very well …

Viewing 10 posts - 16 through 25 (of 25 total)
  • Author
    Posts
  • #26251 quote
    GraHal
    Participant
    Master

    Ah gotcha so this is the crux of that system as I’m sure you know.

    So if the last Trade made a profit then next trade lot size increases by 2.

    ELSIF PositionPerf(1) > 0 THEN
    OrderSize =OrderSize+2
    ENDIF
    #26252 quote
    Derek
    Participant
    Veteran

    @Grahal:

    This, plus the fact that

    // Riesgo, multiplicador de contratos.
    
    n=6

     

    I don’t understand why the system would always send 10 orders though.

    #26254 quote
    Paris
    Participant
    Veteran

    first system always send 10 orders

     

    n=capital/1000
    
    if n>100 then
    n=100
    endif
    if n<10 then
    n=10
    endif
    
    #26255 quote
    Paris
    Participant
    Veteran

    but it is ok i think i found my mistake .

    i was thinkink sellshort  it is like a sell orders but it have to treat like buy order just  before in the code .

    #26305 quote
    Paris
    Participant
    Veteran

    hi guys back in code ;

    juste mix the two codes and it is very close that i want

    …… but dont works , dont know why …..  could you help me

     

    //-------------------------------------------------------------------------
    // Code principal : MonSystème(196)
    //-------------------------------------------------------------------------
    // Definición de los parámetros del código
    DEFPARAM CumulateOrders = false // Acumulación de posiciones desactivada
    
    DEFPARAM FlatAfter =173000
    
    
    
    // Órdenes máximas
    if Ordersize>18 then
    Ordersize=18
    endif
    
    // Riesgo, multiplicador de contratos.
    
    n=1
    
    HoraEntradaLimite = 090600
    HoraInicio = 090500
    
    HoraEntradaLimite1 = 091600
    HoraInicio1 = 091500
    
    HoraEntradaLimite2 = 093100
    HoraInicio2 = 093000
    
    if dayofweek=1 then //Monday
    daytrading=1
    endif
    if dayofweek=2 then // Tuesday
    daytrading=1
    endif
    if dayofweek=3 then // Wednesday
    daytrading=1
    endif
    if dayofweek=4 then //Thursday
    daytrading=1
    endif
    if dayofweek=5 then // Frifay
    daytrading=1
    endif
    
    
    if Time >= HoraInicio and time <= HoraEntradaLimite and daytrading= 1  or Time >= HoraInicio1 and time <= HoraEntradaLimite1 and daytrading= 1  or Time >= HoraInicio2 and time <= HoraEntradaLimite2 and daytrading= 1  then
    
    
    c1 = open < close-2
    
    IF c1 THEN
    if not onmarket then
    IF PositionPerf(1) < 0 THEN
    OrderSize = OrderSize/2//+1
    if ordersize<1 then
    ordersize=1
    ENDIF
    ELSIF PositionPerf(1) > 0 THEN
    OrderSize =OrderSize+2
    endif
    
    buy ordersize*n contract AT close+2 stop
    endif
    
    c2= open > close-1
    
    
    IF c2 THEN
    if not onmarket then
    iF PositionPerf(1) < 0 THEN
    OrderSize = OrderSize/2//+1
    if ordersize<1 then
    ordersize=1
    ENDIF
    ELSIF PositionPerf(1) > 0 THEN
    OrderSize =OrderSize+2
    ENDIF
    
    sellshort ordersize*n contract AT close-1 stop
    endif
    endif
    endif
    endif
    
    
    
    
    
    SET STOP ptrailing 5
    #26309 quote
    Paris
    Participant
    Veteran

    ok i got it

    just forgot that :

    once ordersize=1
    
    
    
            
            
        
    #26311 quote
    GraHal
    Participant
    Master

    Glad you sorted it Paris. We look forward to seeing the results when you are ready?

    #26350 quote
    Paris
    Participant
    Veteran

    i ve this code put  in demo account , it begins monday , i will see it is good or not …

    maleknf thanked this post
    #211282 quote
    anaya07
    Participant
    New

    bonjour

    des nouvelles du code..

    hello coding news..

    #211287 quote
    robertogozzi
    Moderator
    Master

    @Paris

    Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.

    Thank you 🙂

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

A little help for this strategy that works very well …


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Paris @ladefense Participant
Summary

This topic contains 24 replies,
has 2 voices, and was last updated by robertogozzi
2 years, 11 months ago.

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