Trailing Profit Target

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #185361 quote
    MichaelT
    Participant
    New

    Hello all,

    My name is Michael and I have a question.

    In ProRealTime, after you’re in a position you have the possibility to set a Trailing Stop (fixed or in %). You also have the possibility to set a Profit Target. However, is there a possibility to also have a Trailing Profit Target?

    Thanks for your help in advance!

    #185362 quote
    JC_Bywan
    Moderator
    Master

    Hi,

    A little bit more patience, it is coming very soon

    (I move this topic from probuilder forum to proorder forum)

    #185492 quote
    MichaelT
    Participant
    New

    Hi JC_Bywan,

    Thankyou for your quick reply. That’s great to hear, I’m looking forward to it.

    Regards,

    #192609 quote
    MichaelT
    Participant
    New

    Hi JC_Bywan,

    I was curious as to whether there is any more information available when this Trailing Stop Profit Target will be available?

    Thanks!

    #192610 quote
    JC_Bywan
    Moderator
    Master

    Hi, here they are in Nicolas’ post from last March, if they don’t get a syntax error when you type them in your proorder/probacktest code editor, then they are deployed with your PRT version: https://www.prorealcode.com/topic/new-trading-instructions-better-management-of-your-orders/

    #192612 quote
    MichaelT
    Participant
    New

    Hi,

    Thank you for your quick reply! Which one should be used for the Trailing Profit Target?

    Michael.

    #192622 quote
    JC_Bywan
    Moderator
    Master

    Hi,

    any of these below, with the flexibility of combining them with “if” statements for your trailing rules ending up defining variable X:

    • Set Stop Price X : Allows to set a stop at a price X defined directly by the user and not in relation to the entry price of the position.
    • Set Stop pProfit/%Profit/$Profit/Profit X : Allows to set a stop at X points / % / € / unit above the entry price of the position.

     

    For example, if you want to raise the trailing profit level by 5 points each time your price is 40 points above the trailing profit level :

    EntryConditions= ...
    
    IF NOT LongOnMarket AND EntryConditions THEN
     BUY 1 CONTRACTS AT MARKET
     trailingprofitlevel=lowest[20](low)-5*pipsize//just an example to start from, replace with your start
    ENDIF
    
    ExitConditions= ...
    
    If LongOnMarket AND ExitConditions THEN
     SELL AT MARKET
    ENDIF
    
    // Stops et objectifs
    
    if LongOnMarket AND close-trailingprofitlevel>40*pipsize then
     trailingprofitlevel=trailingprofitlevel[1]+5*pipsize
    endif
    
    set stop price trailingprofitlevel
    
    graph trailingprofitlevel
    Midlanddave, Nicolas and ulven thanked this post
    #192724 quote
    MichaelT
    Participant
    New

    Hi,

    Thankyou for your quick answer and your explanation!

    Regards,

    Michael.

    #193128 quote
    ulven
    Participant
    New

    Hi JC Bywan,

    Is there a way to the reduce the initial value on “Set stop ptrailing” step by step? either after a set number of bars or by time?

     

    Regards

    Lars

    #193136 quote
    JC_Bywan
    Moderator
    Master

    Hi, there’s no ptrailing in the new instructions? Not sure if it’s a typo and you’re talking about set stop price X, with X used as a custom trailing level variable, or set stop pProfit, or the old set stop trailing instruction (which personnally I don’t use and find less useful than the new ones).

    But yes, with set stop price X for example, you can imagine any condition you’d like within “if” statements to modify X step by step, can be number of bars(horizontal axis), can be progress made (vertical axis), can be time, can be something crossing something else (event)…

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

Trailing Profit Target


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
MichaelT @michaelt Participant
Summary

This topic contains 9 replies,
has 3 voices, and was last updated by JC_Bywan
3 years, 8 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/13/2022
Status: Active
Attachments: No files
Logo Logo
Loading...