trailing stop after achieving x pips

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #166861 quote
    Slowlyslowly
    Participant
    Average

    Hello

     

    I understand I can add a trailing 10 pips stop with “SET STOP PTRAILING10”

     

    how would i write it when i want the code to achieve 8 points FIRST before the PTRAILING10 starts (i.e when the code is in 8 pips profit and before that the STOPLOSS would be 5 if the code never went into profit of 8 )

     

    Many thanks

    #166868 quote
    robertogozzi
    Moderator
    Master

    SET STOP PTRAILING can only set the start, the pace is always 1.

    Most people use the code at lines 17 – 56 at https://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/, or similar snippets that can be easily found in this forum using the search box for the words TRAILING STOP.

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

trailing stop after achieving x pips


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
4 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/12/2021
Status: Active
Attachments: No files
Logo Logo
Loading...