trailing take profit looking at 3 conditions

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #29340 quote
    micwemicwe
    Participant
    New

    Hey guys,

    slightly stuck here.I have been trying to create a trailing TP which would reference 3 things MA cross overs ,75% of my take profit and current price

    The idea is say i have a cross over on a long position and my TP is 150pips away i want it to close 70% of my position 112.5 pips into the move and reminder if i hits the full 150 pips.

    thanks.

    (MAs are 20 average close and 3 average close)

    #29341 quote
    EricEric
    Participant
    Master

    you need 2 system

    with the same code but different exits

    #29342 quote
    micwemicwe
    Participant
    New

    how exactly would that look like below is the long part of the code

     

    // parameters
    indicator1 = Average[x](close)

    indicator2 = Average[y](close)

    //basic parameters for bs

    c1 = (indicator1 CROSSES OVER indicator2)

    c2 = (indicator1 CROSSES UNDER indicator2)

    IF c1 THEN

    BUY X contract AT MARKET

    ENDIF

    IF c2 THEN

    SELL AT MARKET

    ENDIF

    #29348 quote
    micwemicwe
    Participant
    New

    ah i get you thanks.

Viewing 4 posts - 1 through 4 (of 4 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

trailing take profit looking at 3 conditions


Platform Support: Charts, Data & Broker Setup

New Reply
Author
author-avatar
micwe @micwe Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by micwemicwe
9 years, 6 months ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 03/21/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...