Changing Stop Loss after a certain time in trade

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #211470 quote
    CrocogotterCrocogotter
    Participant
    New

    Hiya

    I suspect that there’s a simple way of doing what I’d like, but unfortunately I haven’t got the programming knowledge to work it out. What I’d like to be able to do is change the Stop Loss to Break Even after 30 minutes, using a 1 minute chart. Initial Stop Loss would be 60, but I’d like to be able to code it to change it to Break Even after 30 minutes please.

     

    Many thanks in advance.

    #211475 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    30 minutes are 30 1-minute bars, so you must check they are elapsed AND you have some profits:

    IF OnMarket AND (BarIndex - TradeIndex >= 30) AND PositionPerf > 0 THEN
       SET STOP Breakeven
    ENDIF
    Crocogotter thanked this post
    #211476 quote
    CrocogotterCrocogotter
    Participant
    New

    Many thanks for the speedy reply, I’ll give that a try.

Viewing 3 posts - 1 through 3 (of 3 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

Changing Stop Loss after a certain time in trade


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/13/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...