au prochain signal acheter pour le montant vendu précédemment

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #184355 quote
    arrotarrot
    Participant
    Junior

    bonjour
    voici mon code. Au premier achat je voudrais acheter 10.000€. les achats suivants 10.000€. Puis si vente, vente de toutes les positions. Ensuite sur critère d’achat, acheter pour un montant égal à celui de la vente précédente.
    merci de votre aide
    cordialement
    André

    // Définition des paramètres du code
    DEFPARAM CumulateOrders = true // Cumul des positions désactivé
    
     
    
    // Conditions pour ouvrir une position acheteuse
    indicator1 = MACDline[12,26,9](close)
    indicator2 = MACDSignal[12,26,9](close)
    c1 = (indicator1 CROSSES OVER indicator2)
    indicator3 = MACDline[12,26,9](close)
    c2 = (indicator3 < 1.4)
    
    IF c1 AND c2 THEN
    BUY 10000+STRATEGYPROFIT CASH AT MARKET
    ENDIF
    
    // Conditions pour fermer une position acheteuse
    indicator4 = MACDline[12,26,9](close)
    indicator5 = MACDSignal[12,26,9](close)
    c3 = (indicator4 CROSSES UNDER indicator5)
    indicator6 = MACDline[12,26,9](close)
    c4 = (indicator6 >= 3)
    indicator7 = DonchianChannelDown[30]
    c5 = (close CROSSES UNDER indicator7)
    
    IF (c3 and c4) OR c5 THEN
    SELL AT MARKET
    ENDIF
Viewing 1 post (of 1 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

au prochain signal acheter pour le montant vendu précédemment


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
arrot @arrot Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 01/02/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...