probleme avec le declenchement de la strategie sur IG

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #257822 quote
    gregouech
    Participant
    New

    Hello

    J’ai fait un code assez simple qui shorte le retournement d’une bougie en Hekin Ashi.

    Ca marche comme il faut en backtest mais ca ne se declenche pas en automatique sur IG.

    J’ai ce probleme qque soit l’instrument (NG, XAU, SP, CC ….) et d’autres strategies s’enclenchent normalement donc ce n’est pas un probleme de compte a prioi.

    Bref, i am at a loss, merci pour toute suggestion

    codeHA.itf
    #257849 quote
    robertogozzi
    Moderator
    Master

    Essayez cette version légèrement modifiée :

    //-------------------------------------------------------------------------
    // Main code : short Hekin Ashi XAU
    //-------------------------------------------------------------------------
    defparam cumulateorders = false
    
    xClose = (Open+High+Low+Close)/4
    if(barindex>2) then
       xOpen= (xOpen[1] + xClose[1])/2
       xHigh= Max(high, xClose)
       xLow = Min(low, xclose)//xopen)
    endif
    
     
    red   = xclose[0] < xopen[0]
    white = xclose[0] > xopen[0]
    
    c0 = white[1] and white[2] and red[0]
    c1 = red[1]   and red[2]   and white[0]
    
    IF Not ONMarket THEN
       if c0 then
          sellshort 5 contract at market
       endif
    endif
    if onmarket and c1 then
       exitshort at market
    endif
    set stop   %loss   3
    set target %profit 3
    


    #257861 quote
    gregouech
    Participant
    New

    Hey Roberto

    bien note, j;essaie ca. Je vous envoie le feedback, merci pour votre aide

    robertogozzi thanked this post
    #257863 quote
    gregouech
    Participant
    New

    hey Roberto, it solved the issue. Ca doit etre le onmarket pour les short ou les quantites de la seconde condition. Merci beaucoup !

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

probleme avec le declenchement de la strategie sur IG


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
gregouech @gregouech Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by gregouech
2 weeks, 2 days ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 02/11/2026
Status: Active
Attachments: 1 files
Logo Logo
Loading...