Take Profit placement

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #141428 quote
    Nibor9001
    Participant
    Junior

    Hello Trader!

    I have a little code problem.
    It’s about the placement of a stop loss and take profit.

    In detail I want to place the Stop Loss e.g. on the level of a moving Averages or e.g. on the low of the last x periods. The take profit order, on the other hand, should be placed in relation to the stop loss.
    Classically, for example, the take profit should be 2 times the stop loss to achieve a ratio of 1:2 for each trade.

    Placing the stop loss is not a problem for me, but I am not able to program the take profit accordingly.

    I am grateful for any help 😀

    #141434 quote
    robertogozzi
    Moderator
    Master

    Once you have yuor stop loss saved in a variable, say SL, it’s just a multiplication:

    Set Target pProfit SL * 2 //when SL retains pips
    Set Target  Profit SL * 2 //when SL retains a price difference
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Take Profit placement


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Nibor9001 @nibor9001 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
5 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/11/2020
Status: Active
Attachments: No files
Logo Logo
Loading...