Grid orders with one combined stop loss and limit, can it be done?

Forums ProRealTime English forum ProOrder support Grid orders with one combined stop loss and limit, can it be done?

Viewing 15 posts - 76 through 90 (of 308 total)
  • #7215

    @cfta
    Thanks for reply and info!

    @Nicolas

    Thanks for all the work you put into this!
    @Everybody else
    Thanks for ideas!

    #7286

    Ok guys, finally have some time to finish the system.

    So orders basket will now exit with the floating profit curve cross below 2 standard deviation from its 20 period average. From my own test, things go well, of course this system needs a good first entry points. Also please consider that the risk reward ratio has to be set at about 3 or so to give “space” to the profit exit system to be correctly managed.. I found that adding orders in a good trend run is very powerful and can just make gigantic profit very fast, so if the “rr” variable is set to 1 then the profit exit system will be set to ON very soon and exit of orders will happen very fast.

    The original system without exit is still good in this version, just set “rr” variable to 0 and nothing will happen for exiting positions.

    Please find attached the whole code and pictures of the system with and without “BB exit system“.

    This is an original money management code, but as you can see, we can build anything from just little imagination and knowledge, so this thing can evolve or can be totally changed to a whole new system. Your turn to find good use of this 🙂

     

    3 users thanked author for this post.
    #7292

    Great work here guys! Many thanks for your efforts 🙂

    #7308

    Fantastic work ! Many thanks to all for their work and esp to Nicolas, you’re doing a great job and helping a lot of people here. This looks like being the start of a robust money and position management system that can benefit all. I am testing out different ideas with this and will post any interesting results here, would encourage everyone to do the same.

    #7313

    To all participants, I applaud the excellent result of a great team effort – thanks for the postings and the opportunity to learn from the masters.

    I have tested it with the BB exit, on GBPJPY 5m chart from 18/5/16 at 20:30 AEST with a fabulous result: 578% for 8 hours exposure.   I have the rr = 2.

    I am finding that there are not many opportunities in the last few months where this could have been achieved in FX, as the trends haven’t lasted long enough.  The retraces are firing the stop losses.  But one profit like this will take care of 578 losses – so it is a Turtle Traders test of persistence.

    My thoughts are that if the risk is increased to 2%, this may provide enough space for the minor retraces to pass without firing the stop losses, and so reach the target profit.

    Or alternatively, if a trailing stop loss (equating to the risk) was used on the latest trade, any retracement will sacrifice the last trade, but the profit on the early trades would more than compensate.   May I suggest that the grid step be set to say, 6 x ATR and the trailing stop at 2 x ATR.

    I figure Nicolas is doing something like this with the money management and floating profit, but I don’t understand how the coding works.

    I look forward to the experiences of others when testing this amazing system.

    1 user thanked author for this post.
    #7314

    Hi,

     

    I am very impressed with what has been going on here. However, I have tried the latest script ‘grid-orders-ctfa-with-BB-exit’ by importing the itf file, so I haven’t changed anything: it only does 1 trade at the start and then nothing more. It does this on EURO/USD, GBP/USD, CACA40 and it also doesn’t matter if I use a 1 min, 5 min or 15 min timeframe in the backtest.  What could be wrong here?

    Thank you very much for your advice and congratulations!

    Glen

     

    #7318

    Thanks again Nicolas for your great work 🙂 Real time market testing begins today!

    To all others, I’m very happy you appreciate my idea and suggest further improvements.

    @ MikeGC, very good suggestions Mike that can definintely improve profitability and avoid being stopped out of trades before the trend starts, there is plenty of optimization which can be done for this system.

    #7329

    Hi everyone!

    Congratulations for this fantastic job !!


    @gforton
    I was trying the code shared and found that the first condition to join the market is set up with “strategyprofit=0” and this only occurs first time:

    Change this to your conditions to enter and it will work fine, or just delete this part like this:

    Have a nice day and better trading!!

    Cheers!

    1 user thanked author for this post.
    #7330

    Is it possible to have the final code and not the itf file.. i have an import problem ?

    #7333

    Thanks Nicolas!

    Here is the code printed out:

     

    2 users thanked author for this post.
    #7415

    All right, so once again the code beats my knowledge, I don’t manage to run the system in real time because I get the error message;

    “This trading system was stopped due to a division by zero during the evaluation of the last candlestick. Please add protections to your code to prevent divisions by zero.”

    I managed to sort it in the previous version with some advice, in this version I tried to solve it the same way by cutting and pasting some of the lines to different sections of the code but I’m not able to fix it so please help me out you guys with better coding knowledge…

    At least I remembered to delete the graph lines before running it real time 🙂

    BTW has anyone managed to run it properly on JPY pairs yet? I have only had one entry order and then stopped out asap…

    #7420

    Sorry for this stupid bug.

    Here is a quick fix just replace the lines 33 & 34 with these ones:

     

    #7421

    @Mike

    About ATR step instead of fixed one is clever. But, since we want to quickly make huge profit, I suggest to add more orders when the ATR is high and less when it is low. So when the ATR rise a lot in short period, it means that actual volatility can guarantee that a lot of grid orders can be launched to grow the floating profit. Then BB exit would take care of the rest. Of course, we are talking of backtest, live environment should not the exact same thing as market slippage can take its part into making trouble.

    So a dynamic scale of the grid step could be coded, but it would be inverse of the ATR value. High ATR should mean minimal grid step and low ATR a larger one. Also, a minimal value of the grid step can be implemented.

    Do you agree? everyone?

     

    1 user thanked author for this post.
    #7457

    @simon_json

    Hi Simon, I have just discovered your post re an ATR trailing stop – I couldn’t agree more.   A long trend needs scope so the max profit can be achieved.  The best way to do this is with a wide trailing stop but with the accompanying increased risk.  This is the beauty of @cfta grid system – the profit does not rely on one trade.

    1 user thanked author for this post.
    #7461

    @Nicolas

    I agree re the order size but I am not so sure about the BB exit.

    I have attached the results of a test trade on CADJPY that is mouth-watering.  Goodbye 2:1, hello 10:1!

    I’m afraid I butchered your code Nicolas and your money management and r:r control, cfta- many apologies.

    The trailing stop in the test is the SuperTrend.  As you may well know, it is based on the ATR.  The formula for both………….

    Super trend values are calculated as follows

    Up = (HIGH + LOW) / 2 + Multiplier * ATR
    Down = (HIGH + LOW) / 2 – Multiplier * ATR
    When the change of trend occurs, the indicator flips

    Average True Range is calculated as follows

    Current ATR = [(Prior ATR x 13) + Current TR] / 14

    – Multiply the previous 14-day ATR by 13.
    – Add the most recent day’s TR value.
    – Divide the total by 14

    I have attached the butchered code – ugh, not very tidy but I don’t have the expertise to complete the money management nor the grid step – sorry.

     

Viewing 15 posts - 76 through 90 (of 308 total)

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