Prise de profits

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #42838 quote
    Albaran
    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.

Prise de profits


Support ProOrder

New Reply
Author
author-avatar
Albaran @albaran Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: Support ProOrder
Language: French
Started: 08/09/2017
Status: Active
Attachments: No files
Logo Logo
Loading...