Prise de profits

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #42838 quote
    AlbaranAlbaran
    Participant
    Average

    Bonsoir,

    Ayant quelques soucis à coder plusieurs prises de profit différentes dans le même système de trading, je me tourne à la communauté. L’idée est de diminuer progressivement la prise de profit au fur et à mesure que la durée de la position dans le marché augmente. Mon code ressemble à ceci:

    if longonmarket and barindex - tradeindex(1) <= 1 then
    SET TARGET pPROFIT 10
    elsif longonmarket and barindex - tradeindex(1) > 1 and barindex - tradeindex(1) <= 3 then
    SET TARGET pPROFIT 6
    elsif barindex - tradeindex(1) > 3 then
    sell at market
    endif
     
    Set stop ploss 20

    Le problème est que ceci ne semble pas fonctionner en backtesting…

    Des idées?

    Merci.

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

Prise de profits


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
Albaran @albaran Participant
Summary

This topic contains 1 voice and has 0 replies.

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