Update Target Price after each candle

Forums ProRealTime English forum ProOrder support Update Target Price after each candle

Viewing 13 posts - 1 through 13 (of 13 total)
  • #176372

    Hi,

    Would like to find a way to update a target price value after each candle.  For example, the TP is set to be close – moving average[10].  How can I update the TP once the position is on, so if the MA drops then the TP is also lowered?

    Thought there might be something in the “summation” but not had any luck yet.

     

    Thanks

    #176378

    Try this:

    2 users thanked author for this post.
    #176382

    Thanks Roberto – you star!

    #176383

    Try this:

    Hi robertogozzi,

    Thanks for the idea.  I am trying this out where the 20 period moving average is set as the Target Profit.  However, this will be lower than the Entry price where the market drops, so TP would not be greater than zero.  I have tried “<> 0” and other variations, but I can’t get this to work.  Hope that the attached image will help explain.

    Thanks very much as always

    #176385

    Replace line 1 with this one:

     

    #176462

    Replace line 1 with this one:

    Hi robertogozzi

    Will PRT allow you to change the TP once the trade is on (up or down)?  Thanks very much

    #176475

    Yes, you can.

    On limited risk accounts you can only reduce it, though.

     

    #177085

    Hello!

    I find this method for profit target very interesting and have been dabbling with it for a week. I’m trying to combine in with a hard stoploss, but can’t seem to make it work. Let’s say I’d like to use this code and a percentage stop loss of 0.5%. Would this be possible? I’ve tried many variations, but none seem to work. The challenge is of course that if you use this and the market instantly goes against you, the loss is theoretically higher than your solvency.

    Here are two examples, neither of which work.

    Any ideas?

    #177092

    Line 5 is correct (then code contains many syntax and logical errors, but I think this is just an example as you would have been returned some error messages), just replace it sith 0.5.

    IF…THEN must be on a line of its own and can’t be assigned to variables as it does NOT return any value, it just checks whether conditions are met or not.

     

    #177105

    Yes, it’s just an example and I noticed I wrote a completely faulty code, but was only able to edit the post once. Guess there is a limit on that? In any case, the actual code is not the issue, but I see I also explained it poorly. Optimally I would like to make it so that the profit target function is activate when the position is in profit, but that set stop loss activates if say the market moves against me and I’m down x points on my position.

    Something like this,

    Does this make sense?

    #177107

    You have a 5-minute time to edit your post.

    PositionPerf is a factor, to make it a percentage multiply it by 100. To convert it into Pips:

    to get the same value in currency:

    1 user thanked author for this post.
    #177131

    Thank you, Roberto! That is very useful information. I reckon I’m getting closer, but am not quite there. I tried to do it like this, but it seems to not take effect only when I’m down x points. Have I misunderstood how this works? Any ideas for how to make it work?

    #177139

    Sorry, my fault, I wrote my second line incorrectly.
    Now I edited it with the variable MONEY.
    Use the first line with PIPS (you just need to remove the multiplication by PIPVALUE at the end of line 1 in your code).

Viewing 13 posts - 1 through 13 (of 13 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login