trailing stop step

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #112433 quote
    tommyp23
    Participant
    New

    hi guys,

    I have a simple strategy that trails the position entered into with a trailing stop. instead of activating as soon as the price moves 1 pip in favour, i want it to start once the trade is onside by 10 pips, so the step is 10. then once at breakeven I want the stop to trail the price by a step of 5 points, is this possible? I am a newbie but cant find anything that illustrates this on the forums at present.

     

    currently all i have in my code at present for my stops and targets is below:

    // Stops
    SET STOP pTRAILING 10
    // Targets
    SET TARGET pPROFIT 35
    #112439 quote
    robertogozzi
    Moderator
    Master

    >> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! <<

    #112440 quote
    robertogozzi
    Moderator
    Master

    I suggest not to use the built-in SET STOP pTRAILING instruction, it’s not possible to set a breakeven and the step is 1 and cannot be changed.

    You’d rather resort to coded trailing stop snippet than can be found throughout this forum and mainly here https://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/.

    If you have a strategy but don’t know how to add it, then post your code and ask… someone will help you asap.

    #112442 quote
    robertogozzi
    Moderator
    Master

    You can also browse this file to find functions and examples that may help you when coding https://docs.google.com/spreadsheets/d/1rgboqj7sVwsP9ZRhOduOefye48QMWC07jWVXCl-KJPU/edit#gid=0.

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

trailing stop step


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
tommyp23 @tommyp23 Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzi
6 years, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 11/08/2019
Status: Active
Attachments: No files
Logo Logo
Loading...