How to move my stop loss

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #88437 quote
    Warsy
    Participant
    New

    How to move my stop loss below the low of the latest bar when I’m in profit to lock more pips?

    #88438 quote
    robertogozzi
    Moderator
    Master

    Since you want to move your SL under the latest low, I assume you are LongOnMarket:

    IF NotOnMarket THEN
       NewSL = 0
    ENDIF
    IF (close - TradePrice) >= 50 * pipsize THEN //50 pips or whatever you choose
       NewSL = max(NewSL,close - low)
    ENDIF
    IF NewSL > NewSL[1] THEN
       SET STOP LOSS NewSL
    ENDIF
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

How to move my stop loss


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Warsy @warsy Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
7 years, 1 month ago.

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