Stop Loss at breakeven and close half of position Take Profit – Strategy Coding

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #92279 quote
    Maisam ZaidiMaisam Zaidi
    Participant
    Junior

    Hello,

    Can someone please help me with the following:

    Rules for LONG Trades;

    1. Initial Stop at 65 pips.
    2. Close half of the position at +50 pips; move stop loss on rest to initial entry price (breakeven).
    3. Close remainder of position at +195 pips.

    Same rules apply for SHORT trades.

    I am trying to do a backtest on EURUSD. Can anyone please provide the code for the above rules.

    Thank you.

    Regards,
    Maisam

    #92331 quote
    NicolasNicolas
    Keymaster
    Legend

    Everything you need for this is included in this code example: https://www.prorealcode.com/topic/bollinger-band-coding-help-please/#post-80959

    Levels are expressed in percentage of the takeprofit and not in pips for breakeven/partial closure.

    #92374 quote
    Maisam ZaidiMaisam Zaidi
    Participant
    Junior

    Thanks @ Nicolas.

    I will have a look.

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

Stop Loss at breakeven and close half of position Take Profit – Strategy Coding


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Maisam Zaidi @maisam Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Maisam ZaidiMaisam Zaidi
7 years, 8 months ago.

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