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 - 91 through 105 (of 308 total)
  • #7467

    @Nicolas
    “Dynamic scale of the grid step” sound interesting and good!

    @MikeGC

    Thanks!

    #7474

    @Mike

    Thanks for your post, but in this code you totally deleted the money management system of cfta. This code only add orders on the same trend and then exit them when the supertrend change direction. I’m sorry, but what is the best of the system here is the 1% loss despite of how many trades are on the run, so while deleting this part, it’s like get back to the beginning 🙂

    I’ll plan to work on dynamic step asap. But I’d like to find a good way to enter market first, so do anyone have worked already on that? I know a lot of people are reading this thread, don’t be shy! 🙂

    #7507

    @Nicolas and everybody

    I might have found a system which might work as an entry. It is called State Space and I have started a new thread here to discuss it:
    http://www.prorealcode.com/topic/state-space/

    I have there also posted some combinations together with the grind system, starting in post 4 I think. But I think its good to start reading from post 1.

    @Nicolas
    could you please help with the first goal in the thread?

    Please use all systems there carefully. I have not used them live yet.

    #7521

    @Nicolas

    I am sorry if I offended you or cfta.  It is not that the idea and the coding aren’t brilliant.  I was merely trying to demonstrate an alternative as I was finding the BB exit system showing mostly losses on back tests.  I did not intend it as complete code but I don’t know how to code the money management system to integrate with a SuperTrend stop.

    Has anyone else back tested the grid system extensively with the BB exit switched on?  Are you finding the same issues?

    #7534

    I will share my actual start point in my trading.

    I wait till the markets moves at least 45 pips in any direction above or under Exponentialaverage[8](close). When this occurs a limit order starts at this Exponentialaverage[8](close) buy or sell. I got a fixed profit and stop for 25-30 pips. I tryed BB exit with worst results than taking a fixed profit (maybe beacuse backtest limits).

    See attached images.

     

    #7544

    @Adolfo

    This is normal since you don’t use add orders in your strategy. Adding the bollinger bands deviation over the floating profit curve give us some space for the whole basket orders to close while it can continue to make profit along the way. It’s just a way of let the profit run than to exit properly with a fixed % trailing stop.

    I haven’t code anything else with BB exit for the moment. But I think its powerfulness resides in a trending market condition with a simple entry based on things not too complicated, I do believe that a couple of moving average could make the trick.


    @Mike

    I’m not offended at all! Let’s share your ideas! Sorry if it looked different in my previous replies.

    #7546

    @Nicolas

    Thanks for give back your feedback. I tested my strategy adding orders (see attached image). It gives very good trades sometimes and the most important thing is it didn’t crash the whole account over the time, so it’s not so bad! ( with BB EXIT ). but sometimes i don’t like it, hehehe, like image2.

    Keep following for news, thanks all!

    #7551

    Ok but please keep in mind that the BB exit calculated on the floating profit is exactly the same thing as a standard bollinger bands on price. It is more convenient to recalculate it on floating profit because it is the same deviation for the buy and sell orders, that’s all.

    Floating profit is nothing more than the difference of the actual price and the average price of orders, multiplied by the number of them. So its curve, is the same as the price itself.

    The BB exist operand only if the Risk Reward ratio is reached so it would never exit positions in loss (if everything is in the code though! 🙂 )

    #7632

    Hi all, very very intesresting… but… something is missing!!! I really like that you have developped a Trading system from the end. Usually we develop TS from the enrty conditions 🙂 not from the exit.

    So… Now What is missing is the entry condition. I am working on it and will come back soon.

    What I have changed to the TS?

    1. the system does not only one entry
    2. gridstep is decided depending on the choosen index and it is 1/4 of the riskpercent. In future this should be decided using ATR!! very important. (Will work on this also)
    3. the RRreached = 0 is setup in a different position then nicholas TS. Sorry Nicholas but it wasn’t working where you have done it and I do not undestand why. Do you know why?
    4. I have added some comments to explain better all the lines.

    I am working now to find the entry condition… what we have to look for is a paramenter that tell us when a direction is choosen… one question… on which TF you would like to run it?

    It is importan that this system will run on index with fixed spread if we want to use it on bigger TF than 15 minutes. During night we have too big spreads on normal index. Maybe we should use this on commodites?

    Nicholas, one question… when we run a backtest all the loosing trades should have the same loss. (1% of the account). Why does not work in this way? pleas elook the image attached.

     

    In the picture one example on dax 1 hour with spread 1.

    Last thing that it seems that we forget always 🙁

    The code must be roboust. This mean that if I run it on different index it should have similar performance in all. (I think that this is the reason why most of the code I found on this forum are not good for real money trading)

     

     

    Here my code modifed:

     

    #7655

    Hi, while working on that code I realize there were a mistake in the floating profit formula.

    The good one is:

    While the old one were sufficient for indices for example, it were not good for forex pairs.

    Maybe that is where is the trouble with your tests David.

     

    #7660

    @David-1984 thank you for the comments.

    I would like to discuss “Robustness” some more as a general concept because I believe the notion of Robustness across different instruments/pairs is unrealistic. You probably have much more experience with writing algorithms than I do, so I would really like to openly chat about it some more. I think it’s best if we discuss this as a New Post?

    I look forward to learning from your experiences.

    #7668

    This is a really good point @dwgfx. One that has concerned me for some time. Thanks for bringing it up. I am very interested to hear what others think.

    It harks back to Nicholas’s post re curve fitting. In my limited experience with PRT, I don’t think there is a way to find the optimal settings for a portfolio of instruments. However, Amibroker does have this ability. Has anyone had any experience coding Amibroker? It could be used to optimise a system so the settings could then be used in PRT.

    #7672

    Robustness is the one of the major thing an algorithm trader/coder should focus on. There are many aspects about what we call Robustness in quantitative and algorithmic trading and this is by far a very large subject that of course deserve a new topic.

    FYI, Walk-Forward and Monte Carlo analysis are on the to-do list to the things that could be added to the optimization module of prorealtime.

    #7700

    Hi all, I said a stupid thing in my previus post… I said that the Loss should be always the same value. This is not true because our account is not static and it is updated with older trades. This mean that if we have 10000 euro and 1% risk we will lose 100 euro only in the first trade. After that we make (or lose) money we will lose 1% of a bigger value. Sorry again for the mistake.

     

    While checking this I found another small problem…

    In this formula the below  ticksize could be wrong. It return to us the value divided by 100. This happen in all index except the commodities. For them it works.

    I make an example in the picture. Nicholas, could it be a problem witgh IG market PRT version? Can somone check if also in theyr system this problem appear?

     

     

    OT: let’s discuss here about robustness

    http://www.prorealcode.com/topic/robustness-in-automated-algorithmic-trading-systems/

     

    #7836

    Nicolas, I’m afraid I have not managed to make the system with BB exit work as intended yet in real time markets, whenever I start the system it takes one trade and then gets stopped out after a 10 pip / 0.1 % loss. I tried the fix you  mentioned above and the other fix posted on page 6;

    http://www.prorealcode.com/topic/grid-orders-with-one-combined-stop-loss-and-limit-can-it-be-done/page/6/#post-7329

    It would be great if we can make the BB exit work. Here is the code I used for longs;

    Please have a look!

Viewing 15 posts - 91 through 105 (of 308 total)

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