How to move my stop loss

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #88437 quote
    WarsyWarsy
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

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 robertogozzirobertogozzi
7 years, 9 months ago.

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