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 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
    Nicolas
    Keymaster
    Master

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

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 Zaidi
7 years ago.

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