Trailing Stop and Breakeven codes

Forums ProRealTime English forum ProOrder support Trailing Stop and Breakeven codes

Viewing 15 posts - 1 through 15 (of 26 total)
  • #93285

    I hope this could help, theese are the codes i use for all my algos and they are all made by Nicolas and 1 by Ale, i see that there are many post about it and sometimes could be hard for new users to found it, maybe Nicola could make 1 single post on the library with this, but i ask for a check because somethimes in my algos there is some problems with it. (sorry for my english ehehe)

    9 users thanked author for this post.
    #93286

    Great idea Gianluca … just what I needed!

    Link to above post added to here 

    Snippet Link Library

     

    2 users thanked author for this post.
    #93287

    but i ask for a check because somethimes in my algos there is some problems with it

    Do you have problems with all 4 x TS Codes or just one specific TS Code?

    #93290

    only the breakeven

    1 user thanked author for this post.
    #93293

    @Gianluca make sure the trailing stop is above the breakeven. Makes a difference too.

     

    Using above codes, then you have to use “not on market” as entry condition.

    However, if you have long position and get a short signal you want to reverse immediately right, but that maybe get’s skipped now since it’s waiting for the active trade to first hit a target (stoploss, trailing-stop, breakeven etc) because of “not on market” condition.

    If you use those codes, and do not use “not on market” as entry criteria, you may get unexpected results.

     

    That’s an issue and influences WF and optimisation results. I think it creates fake WF results! (but perhaps looking nicer)

    1 user thanked author for this post.
    #93374

    If you use those codes, and do not use “not on market” as entry criteria, you may get unexpected results.

    thank you, but i put in all my codes the code

    🙂 i am only intraday trader for now, stoppend all the multidays except for the pathfinder swing

    #99370

    Hi Paul, I wonder wether you can help here – I’ve coded the below as far as I can get but seem to be just missing one minor detail! I’m Still working on a way to combine a trailing stop with a trailing step that becomes a fixed stop – i.e Trade is a buy open with a 10pt stop, if it moves 2 up, your stop is now 8, if it moves another 2, it’s now 6 but when it gets to 10, so break even on a 1-1, it becomes fixed. Currently I only get a trailing to stop at breakeven, so still risking the full 10.

    I notice that with this although I’m getting the result of the trailing stop at breakeven which is great, the trailing stop still seems to be live with a step as the deal closes sometimes later at 25 or 35 or 45 etc…great problem to have but not what I want as I lose on bigger moves.

    Adding a trailing stop after the first one becomes fixed would be the next part, so if it moves another 30 pts you bank another 10 for example. I’m thinking this is a simple code tweak..? Code below, perhaps you can help me..?

     

    #99383

    Nothing is a simple tweak or maybe it is for the experts.

    Have a look in the snippet link library for some ideas.

    i.e. Trailing Stop Loss and Trailing Take Profit from Vonasi.

    #129156

    do you use all 4 codes in the same strategy? or only 1 code in 1strategie?

    #129176

    Hi @Paul — this is my preferred trailing code. Should I have ‘not onmarket’ in the entry conditions? I’ve tried it with and without but back test results are identical.

     

    #129187

    Should I have ‘not onmarket’ in the entry conditions? I’ve tried it with and without but back test results are identical.

    Hi, I don’t prefer that. When optimising for good signals, all signals should have value, regardless if there’s a position in opposite direction or not.

    You could try this, made it a bit as my other trailing stops. Tested with not onmarket  and without in entry conditions and have different results.

     

     

     

    2 users thanked author for this post.
    #140047

    Very good post. I´ve recently worked with a low tf (2,3m) robots and I put many hours in the trailing stop code. I get really good results with OOS/IS 70/30 with kind of high trailingstep (over 1%). When I think about one low tf 2-3min bot running over 1% I feel like it gets very curve fit even tho I run it 5 times and get 50+ wfe.

    Do you guys have any tips to add in a low tf bot? Is breakeven, atr or other opitions a MUST have in the trailstop. Or should i just optimize the system with max 0.7% trailingpercent?

    I would appriceate all thoughts. Thanks!

     

     

    #141875

    I think depends by the strategy 🙂

    #145404

    small change to code above. Splitted for long & short, added one for sensitivity to see difference and used accelerator, if using bigger percentage means bigger steps.

     

    #145405

    edit…

Viewing 15 posts - 1 through 15 (of 26 total)

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