Take Profit placement

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #141428 quote
    Nibor9001Nibor9001
    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
    robertogozzirobertogozzi
    Moderator
    Legend

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

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 robertogozzirobertogozzi
6 years, 1 month ago.

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