Trailing Profit Target
01/13/2022 at 6:23 PM #185361
My name is Michael and I have a question.
In ProRealTime, after you’re in a position you have the possibility to set a Trailing Stop (fixed or in %). You also have the possibility to set a Profit Target. However, is there a possibility to also have a Trailing Profit Target?
Thanks for your help in advance!01/13/2022 at 7:03 PM #18536201/14/2022 at 6:50 PM #18549205/03/2022 at 4:40 PM #19260905/03/2022 at 4:53 PM #192610
Hi, here they are in Nicolas’ post from last March, if they don’t get a syntax error when you type them in your proorder/probacktest code editor, then they are deployed with your PRT version: https://www.prorealcode.com/topic/new-trading-instructions-better-management-of-your-orders/05/03/2022 at 5:06 PM #19261205/04/2022 at 6:59 AM #192622
any of these below, with the flexibility of combining them with “if” statements for your trailing rules ending up defining variable X:
- Set Stop Price X : Allows to set a stop at a price X defined directly by the user and not in relation to the entry price of the position.
- Set Stop pProfit/%Profit/$Profit/Profit X : Allows to set a stop at X points / % / € / unit above the entry price of the position.
For example, if you want to raise the trailing profit level by 5 points each time your price is 40 points above the trailing profit level :12345678910111213141516171819202122EntryConditions= ...IF NOT LongOnMarket AND EntryConditions THENBUY 1 CONTRACTS AT MARKETtrailingprofitlevel=lowest(low)-5*pipsize//just an example to start from, replace with your startENDIFExitConditions= ...If LongOnMarket AND ExitConditions THENSELL AT MARKETENDIF// Stops et objectifsif LongOnMarket AND close-trailingprofitlevel>40*pipsize thentrailingprofitlevel=trailingprofitlevel+5*pipsizeendifset stop price trailingprofitlevelgraph trailingprofitlevel05/05/2022 at 8:55 AM #19272405/12/2022 at 5:27 PM #19312805/13/2022 at 7:00 AM #193136
Hi, there’s no ptrailing in the new instructions? Not sure if it’s a typo and you’re talking about set stop price X, with X used as a custom trailing level variable, or set stop pProfit, or the old set stop trailing instruction (which personnally I don’t use and find less useful than the new ones).
But yes, with set stop price X for example, you can imagine any condition you’d like within “if” statements to modify X step by step, can be number of bars(horizontal axis), can be progress made (vertical axis), can be time, can be something crossing something else (event)…
1 user thanked author for this post.