Create stoploss on the fly

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11300 quote
    algotraderalgotrader
    Participant
    Average

    Hello Traders

    Need a little help with coding.

    I want to “lock a profit”
    My idea is to insert a trailing stop-loss if the position gained a profit of 100 in value

    Is there a way to do so?

    Thanks for your help.
    A.

    #11309 quote
    rajasmasalarajasmasala
    Participant
    New

    Hi algotrader,

    I’m new to prorealtime but I hope this snippet does the trick. I hope I understood your request:

    PositionProfit = PositionPerf(0) * TradePrice //Depends on whether the “100” is in the units of the instrument purchased…

    If PositionProfit >= 100 Then

    Set Stop %Trailing 1

    End if

    Cheers, hope I’m correct…

    #11414 quote
    JakesJakes
    Participant
    New

    Hi there. I discovered this ProOrder AutoTrading only yesterday and is motivated to do it as well. I write to you as I am also from SA and just need to know if this system is successful, and what kind of return one can expect. If you have any advice for me, please be so kind to drop me a mail: conradieko@gmail.com

    It will be appreciated.

    Regards

    Jakes

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

Create stoploss on the fly


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
algotrader @algotrader Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/06/2016
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...