Robot avec 2 time frame

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #221133 quote
    BFBF
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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
    BFBF
    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 BFBF
3 years, 1 month ago.

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