Traielrstop/step with Stoploss

Forums ProRealTime English forum ProBuilder support Traielrstop/step with Stoploss

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

    Hello agasin,

     

    I have a question about scripting the following options.

    i have a stoploss in my code as also a trailerstop with a trailerstep.  The backtest on this script is very good but somehow when the

    algo set on live the Stoploss only appears and when the price of the indices targets the Trailerstop / step nothing happens.. the Stoploss will be there – when the price targets the trailerstop / step  the stoploss must disappear.

    Also when the algo is putting up for live there is no feedback from the the backtrest that there is a error in the code…

    Some one who cna help  me ?

    there should be a scrypt who can  combine these two (or 3) options in one script.

     

    #192406

    How is it set your trailing stop please? Is it a soft coded one from the forum? Or are you using the SET STOP TRAILING instruction please? We need more information to understand what is happening in live trading.

    Did you check the orders rejection list please?

    #192415

    Hello

     

    There is no rejection in any journal. Or maybe you can show me where it must be written down

    The Algo opens the position on the indicator with the normal stoploss (not via the …… ) but as i saidwhen the pricaction reach the trailerstop/step the algo won’t use this command

    while the backtest doesn’t show any errors (Tick by Thick)

    underneath mentioned thje script

    //trailerstep
    trailingstart = 25 //trailing will start @trailinstart points profit
    trailingstep = 5 //trailing step to move the “stoploss”
    //0 is off 1 is on
    trailerStepFlag = 1

     

    with thanks

    Marco

    #192418

    ps. i’m not using the stoprtrailing code from the wizard..

    Again, there are no rejecting orders the algo does its thing but only with th estoploss and doesn’t use the script for the trailerstop/step

     

    greetings

    Marco

    #192436

    Are you using a limited risk account?

    What is “the normal stoploss”, how do you set it?

    Difficult to know where is the trouble with your code as you did not post the full content of the trailing stop part, it seems to come from the forum however?

     

    #192439

    Hello

    Indeed, i use a stoploss 150 euro…

    And i dont have a limited risk account and yes i use the code from the forum. ( wich is of no use as i use a stoploss of 1 % of my balance)

    May the code from the forum is not right?  herunder the code – where also some code is secured..

    #192442

    Ps.

     

    The Dynamic trailer is set on OFF so that doesnt’work  but is not of use in this code.

    greetings

    Marco

    #192445

    Remove lines with “newsl=0”

    and place that code at the top, below TIMEFRAME(1 minutes):

     

    1 user thanked author for this post.
    #192447

    Hello

     

    Thanks , i went live and i think it works… only the pips in the code are disturbing for me…

    Greetings

    Marco

    #192452

    Hello,

     

    I tried the adjustments and the backtest shows more then 36% upto  45% of neutral trades… very strange ( this is with the same Trailerstep/stop and stoploss  – with the newsl=o code i get 80% of profit trades in my backtest)

    can you explain this?

    kind regards

     

    #193048

    Why don’t you just GRAPH the newsl to see how it behaves in the market? You’ll see how and when it is calculated, and how and when orders are closed on that trailing stop price:

    Always GRAPH your variables when there is something you don’t understand, otherwise it is very difficult to analyze the results of the algo 🙂

    #193051

    Hello

    I always Graph my result to see if its works

    But in this case the advise you gave – to erase the News=0 lines was not good,

    More then 50% were neutral trades

     

    Kind regards

    Marco

    #193052

    Hello Nicoals

     

    i have solved the problem myself , just a few adjustments on the script.. and it worked..

    butr thanks anyway for the effort.

    Also

    Also this algo works now- (with a few adjustments in the script of the trailerstop and step)–

    The “problem” I have now “but the trailerstep is calculated in TF candle and I want it dynamic with the price action.

    With other words : the step is done after ending the candle ( in wich timeframe it was scripted)

     

    Kind regards

    Marco

     

    Marco

    ps i cannot send email any more to Market@….

    regards

    Marco

    #193100

    In order to interact during a candle, you have to use multi timeframe.

    Look at those examples:

    https://www.prorealcode.com/topic/move-sl-during-current-candle/#post-79130 (most stoploss to breakeven during candle).

    https://www.prorealcode.com/topic/ouverture-immediate-position/#post-81939 (trigger an order during candlestick).

    https://www.prorealcode.com/topic/how-to-open-and-close-in-1-bar/#post-146272 (open / close an order during the same bar).

     

    #193105

    Thanks Nicoals,

     

    i will try them all and see what suits best.

     

    With thanks

    Marco

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

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