Robot avec 2 time frame

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #221133 quote
    BF
    Participant
    New

    Bonjour à tous,

    Est-il possible de coder un robot avec une entrée basée (achat long) sur un indicateur en timeframe 10 secondes et de sortir (vente) du trade sur le même indicateur mais en time frame 1 minutes svp ?

    auriez vous un exemple de code svp ?

     

    D’avance merci pour votre aide

    #221139 quote
    robertogozzi
    Moderator
    Master

    Voilà:

    Defparam CumulateOrders = false
    //
    Timeframe(default) //laps de temps sur votre graphique (1 minute ou moins, par exemple 10 secondes)
    c1 = close CROSSES OVER  average[10,0](close)
    c2 = close CROSSES UNDER average[10,0](close)
    IF c1 and not LongOnMarket THEN
       BUY 1 contract at Market
    ENDIF
    //
    Timeframe(1mn,UpdateOnClose)
    IF c2 and LongOnMarket THEN
       SELL at Market
    ENDIF
    SET STOP   pLOSS   30
    SET TARGET pPROFIT 90
    BF thanked this post
    #221180 quote
    BF
    Participant
    New

    Merci beaucoup je vais tester ceci ))

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

Robot avec 2 time frame


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
BF @bf Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by BF
2 years, 5 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 09/16/2023
Status: Active
Attachments: No files
Logo Logo
Loading...