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 - 256 through 270 (of 308 total)
  • #16631

    Thanks for the support guys, losing trades are an inevitable part of doing business so let’s just make sure we learn from them 🙂

    Good idea Cosmic, the code you posted is practically the same as older versions before Mike introduced the entry parameters and it is often better to use when market conditions are unclear, I use it myself sometimes too.

    It has proven quite difficult to automate entries which doesn’t require certain market conditions, I’m currently testing reduced periods and eventually removing a a condition or two in order to get entry conditions which are less sensitive and start the system but still reduce the aspect of waiting and watching to get a good entry.

    Kasper, I’m no expert on beartraps but that certainly looked like one with a resolute break of the monthly support. BTW have you made any further progress experimenting with the entry conditions?

    Yesterday I found a nice piece of code in the library uploaded by Doctrading;

    http://www.prorealcode.com/prorealtime-trading-strategies/nice-price-forex-strategy/

    It has been bothering me that by default PRT does not show DI+ and DI- on the ADX and I havn’t figured out how to display it as an indicator or how to code it as a parameter but looks like Doc has the answer;

     

    This way we make the ADX condition also take into account the direction of the price movement and not just it’s strenght, I will try to integrate it to the CFTA indicator but without the Bollinger band parameter.

    #16659

    Hi Cfta. I must say that I kind of got stuck and didn’t develop it further. We agree on the many false breakout’s, and I think the majority if them is because trades goes against the main trend. I not sure, but anyway in all the textbook examples:”trend is your friend” and also “It pays to trade with the professionals”

    We need the multi timeframe support to get this to work. But anyway the gridorder with dynamic gridstep code is here, and It will actually work on any strategy. In my mind there could be some interesting ways to develop new entries on together with a change in the code:

    • entries on major support and resistance+ re-test/false breakouts/trap
    • change the code to include move of SL to break even/profit. perhaps again use the dynamic gridstep as an indicator for how close the SL need to be to insure max profit- but still allow some space.

    I don’t know how or if there is a way to use the build in support/resistance lines in the code, Anyone know of this?

    Also I been reading that the re-test + false breakouts are the way professionals trades and stops out the “non professionals” because everyone has their SL right below the support line – exactly as we saw yesterday.

    Cheers Kasper

    #16677

    Hey Kasper, indeed MTF support would make all the difference in the world 🙂 Entries on S/R sounds good and for a skilled coder like Nicolas it’s probably possible to code but I’m not sure if we can make it work in in real trading because too often the price don’t respect S/R. SL to BE at certain number of entries or profit should be fairly easy to code I might be able to do it myself even if it will take time since I’m still a beginner. Anyway don’t forget about the BB exit feature but make sure the RR setting is not too high, I think the BB exit is the better option most of the time since it can also save profits and not just exit on BE.

    I stripped a few things from the indicator to simplify the code and get more entries with less conditions, I think it looks pretty promising and might be good enough to make a screener out of it even though we should try a few different period values and setings since I coded it this afternoon. Hope you guys like it!

     

    #16836

    Hi CFTA. I think I missed out of the BB exit? what is that? 🙂 I finally got the breakeven and one Trailingstop to work. I thought it was easy, but it took a few evenings and a weekend to complete and test. I made some re-arrangement of the code to include both manual LONG and SHORT and an auto feature with some switches in the code. Very convenient when testing. I did not find a decent auto code so I left it out- but made room for it. I have not optimized the Trailing stop in any way just assumed the following

    • RRreached=0: -1% exit
    • RRreached=1: Breakeven when reached 25% of RR
    • RRreached=2: Tralingstop moved to 45% of RR when  66% of RR reached
    • RRreached=3: RR reached

    I hope you like it. Cheers Kasper  

    NOTE! If you use the manual code it supposed to only make 1 trade cycle, however I just discovered that if it breaks even with exactly 0% it will run a 2nd round!

     

    #16859

    Hi Kasper, that is incredbly creative, I look forward to trying the new features 🙂

    The BB exit is a function which Nicolas coded, the platform paints a graph of the equity curve of a set of trades and adds a bollinger band to the curve, if the curve crosses below the lower bollinger band all trades are closed. The RR is used to determine when the BB exit becomes valid since it otherwise would cause lots of premature exits, if the risk is 1 % and we set the RR to 2 then the BB exit kicks in once we reach a 2 % floating profit.

    Regarding the indicator I figured out something wasn’t right since there were plenty of missed or late signals. It turned out that something wasn’t right with the Heiken Ashi section of the code, after I removed it the incdicator is more accurate, great if we can make the HA candles work too.

    Comparison below, the upper indicator is with HA code and the one below is without.

     

    1 user thanked author for this post.
    #16916

    Hi fellows, I created a couple of screeners based on the CFTA indicator, the cross which is based on a cross over 0.5 or under -0.5 by the previous closed candle. the trend shows the instruments which the indicator give a signal for regarless of when it occurred.

    #17777

    Hello traders, it’s been a while since the last post so time to bump the thread, even if it has been quiet here I have been working on the developement and integrated the CFTA entry parameters to the code and added a corresponging exit. The code is intended to equal a five times higher timeframe so all values have been multiplied by 5 and the ADX threshold  has been reduced to 10 since the values decrease overall when applied to a larger number of periods. Primarily I run it on 1m TF but it may also be ran on m3 equaling m15, but remember the system acts on the most recently closed candle hence it’s risky so run it on higher TFs, we rather need to multiply the values by a larger number.

    It looks very promising on low timeframes with the new stop keeping losses small.

    Sorry Kasper but this has kept me busy and I havn’t tested your most recent developments.

    Note that the below verion has “AND STRATEGYPROFIT=0” on line 39 commented out so the cycle will repeat until stopped in order to re-enter after false entries which are stopped out shortly. Also note that the MA value for the BB exit has not been multiplied.

    Long;

    Short;

     

    Long & Short

    The latest indicator version without multiplier;

    And with multiplier;

    Remember the grid step and ATR settings are at the discretion of each trader and may be adapted to different markets depending on volatility.

    I hope you will enjoy it and give some feedback on possible improvements 🙂

    5 users thanked author for this post.
    #17801

    Good work cfta, will take a look at this later.

    #17864

    Hi CFTA. No worries. I have been busy at work and trading came to a stop because I actually felt out of luck. So I put trading on hold for a while, but I keept the automated strategy running. One in particular with the CFTA indicators was executed on various TF from 1-10 sec. which belong to this post. It created 2 problems. Backtesting sucks because of data range. only max 18 day of data! and the ProOrder was stopped due to some lame error of “the status of the last order could not be verified” IG support have not come up with any plausible explanation for this, and PRT- who actually holds this account don’t receive the debugging data from the demo account when I trigger this feature. So it pretty much stuck to luck and time.  One that managed to stay alive was the strategy on a 10 sec timeframe. I know It sounds crazy to relay on indicators on a 10 sec timeframe- however the result cannot be ignored. I will still let it run for some months, but so far this is what it produced.

    cheers Kasper

    #17880

    Hey Kasper,

    Nice to see you back in the thread. That’s some promising test results and I’m very surprised that the 10 sec one or any for that matter turned out with a positive result. Even though I have changed the code’s deafault setting to have recurring cycles we still need to find out setups manually or with the help of screeners and only start with systems when we have the right market conditions since the indicator only takes us half the way since it may still give signals when the market is choppy or spikes. Hence I don’t think it’s possible to backtest it properly unless running it on one selected suitable period at the time.

    The screeners are helpful but we need further work on how to find solid setups, it helps to run the screeners on higher timeframes but when volatility is lower it lags too much to find the setups we want.

    Btw, your code for adapting to JPY pairs works great even though trade statistics may turn out a bit distorted but the entries and SL works which is most important 🙂

    .

    #18892

    Hi CFTA, Great to hear that the JPY pair code is working. Would be great to have a live update in the code for the conversion, but as long it just more or less the daily/weekly conversionrate I guess it should be okay.

    About the Heikin-ashi code, I made a small indicator. It should indicate a change from green to red and vice versa, or did I miss something? 🙂

    Cheers Kasper

     

    #19395

    This long trade today reached its rr but close quite well below its high almost 30 minutes later – close at 1.05535, high is 1.0655. Believe this is due to BBfloatingprofit logic. Not good in math so can’t wrap my head around this logic. Anyone can explain, any suggestion to improve it? Another first encountered in today EUR currency spike is a position opened at more than double the gridstep setting – unfortunately at its high for my EURJPY trade. This is not necessary a problem, just be aware of this.

    I added in maximum position it can open and entry price (set ep to high if you want immediate opening of trade but do note it does not check for green candle which you can add it back in if you want).

     

    #19400

    @sylvess

    So far I can see that BBexit has done what is is supposed to do: close the orders’ basket when the profit make a pullback to the lower Bollinger band calculated on the current opened orders profit. This function was build specifically for the cfta strategy: give breath to the trades while ensure to not let too much money on the table. Because no one will never know what would be the best way to close a trade (or a trades’ basket here), the BBexit function do this job for you.

    You can play with the Bollinger Bands period at lines 39 and 40, to narrow them and exit faster, it is set to 20 periods by default.

    An idea would be to change this period dynamically, according to the recent instrument price behaviour, use a kind of adaptive MA instead of a simple moving average like I did in the code…

    1 user thanked author for this post.
    #19422

    Merry christmas and happy new year everyone all traders and coders who have contributed or just taken an interest in the thread 🙂

    We have come a long way since my first post a little over 8 months ago, the system that according to the PRT support could not be coded at all turned out to be a only a modest challenge which Nicolas mastered with excellence.

    The holiday break is nearing its end and it is time to prepare for a new year of trading. Regretfully I don’t have any late xmas presents for you in shape of any major improvements of the system. It has proven complicated to figure out an effective automated entry even after having found a promising setup after manual screening but I’m still working on it trying different parameter settings and an occasional swith of indicators.

    I find the screeners I posted above very useful in particular the CFTA Trend, however the only caveat is to notice when the CFTA indicator starts giving a signal and the screener show that a new asset is givning the signal. I am aware that alerts can be set manually on the PRT platform for when the price or an indicator crosses level X but what I am most eager to find out is if someone know how to code a screener or an indicator to create a popup alert once it gives a signal? 

    I have browsed both the indicator and screeners manuals without figuring this out. The idea is to improve the current screeners and easier notice good trades but also create a new screener with a counterfeit MTF support by mupltiplying the values, such as the CFTA indicator gives a signal on M1, M5 and M15 simultaneously we should have a high probability trade.

    @ Kasper, thanks for the HA indicator it can prove to be very useful. Do you think you can modify it to show a signal for HA being green or red and not only the change? In addition do you think it is possible to somehow adjust values in order to reflect a higher timframe, for instance we run it as part of the CFTA indicator on M1 but it shows gives a value if the M5 HA is red or green? The second may be very difficult but I think we could figure out the first one…

    @ Sylvess, for me the BB exit function in the code has been working perfectly however I noticed that your code looks a little different from mine and it looks like you have a large standard deviation multiplier at the end on line 40. For my part I use 0.25 as standard deviation and 40 for the MA setting. Nice to see that you made a nice profit 🙂

    1 user thanked author for this post.
    #19454

    @ Cfta

    Thanks for highlighting. I was using the earlier version, switched to later version now.

     

Viewing 15 posts - 256 through 270 (of 308 total)

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