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 - 286 through 300 (of 308 total)
  • #56055

    Sorry fellows, now I understand the problem rejo had.

    Henrik, very interesting stuff, I will take a closer look soon, thanks for sharing 🙂


    @Nicolas
    , here is the .itf-file. I stripped down another indicator from the library and modified it to only return one value.

    1 user thanked author for this post.
    #56218

    @Henrik, the entry parameters in your code looks interesting indeed, can you explain a bit more about them and perhaps post a pic of a chart showing entries? I tried to create a combined indicator of the entry parameters to get a better visual of valid entries but it is a bit tricky.

    Regarding the carpet bombing method of doubling up on entries I am somewhat sceptical mostly because of stacking entries and doubling the position count gives a lower tolerance for retracements after entry and increase the risk of being stopped out.

    #56785

    Hi Cfta!

    sorry for late response while im taking  some time off. My codes are all inside bar instruction to make entry and exit insidebar with stop and limitorders for buy and profit secure exit. Then you can use bigger timeframe for signals. This is a way to get around prts limitations.

     

    Happy New Year

    Henrik

    #56832

    Hi all,

     

    I have been observing the development of your system with great interest CTFA and I congratulate you with your work.

    Your latest ‘long’ creation looks quite profitable on a 5 min timeframe in backtest and in walk forward analysis.

    I took the liberty of fiddling around a bit with the HA and SQ cut-off value and also with the min max step.  It is yet a little bit more profitable now.

    The ideal situation would be to combine the long and the short version….

    Congrats and Happy New Year,

     

    Glen

    #56869

    Theoretically a better way to accumulate new orders would be to only add on pullbacks.

    This would allow for better average entries and solve the problem of being stopped out on minor pullbacks.

    Basically you still use the grid system to accumulate orders but only add after a pullback of x pips from the last high or low.

    Since markets move in waves this should allow for better average entries.

    #56870

    Also instead of keeping the stop at the 1% risk level as you accumulate orders, rather use break-even after the initial 1% risk.

    Taking risk of the table after the 1st ‘TopUp’ would give much better peace of mind.

    #57013

    Hi Henrik,

    This sounds amazing to be able to circumvent the PRT limitations like this, at first I did not realize it was inside bar calculations. I have had some time off to and will go on a holiday tomorrow but I will look into it more once I’m back in a couple of weeks.

     

    Juanj, only adding on pullbacks would end missing out on the fattest profit due to not adding on when price takes off fast in one direction and the pullback occurs first when the majority of the move is over. There is already a break even feature in the BB exit but it also let us keep a bit more profit.

    #60882

    @Henrik, finally I’m back with time for trading and developement, I have been looking into your code and also forward testing it and I think it looks very promising.

    Do you think it will be possible to include entry based on HA Change and Squeeze? I have been trying to code it myself but can’t seem to figure out how to code it as an inside bar calculaction, I also had some issues with divided by zero errors. I think Squeeze in particular is very important to reduce entries during ranging and sideways movement.

    It would be great if you could look into it since inside bar calculations create amazing opportunities for us 🙂

    #61025

    Hi Cfta!

    The differens is that you set your buy and exit orders with stop and limit orders. The indicators are still limited to the timeframe you choose.  I dont have any time right now but i can se if i can build in this stoporderway into your code.

    Regards Henrik

    #61208

    Hello Henrik,

    Okay that makes sense. No worries I look forward to your feedback when you have time to look into it.

    I made some slight adjustments to your code by translating some of the phrases so it will be easier for our friends here to use and improve. I also tried to reverse the code to have a version for shorts but have not managed yet since it enters into 4 contracts right away.

    Long which is working as intended;

    Short version which is not working properly yet;

     

    #63211

    @Henrik, I have been to trying to develope your code further and also run it live for testing but I keep getting the divided by zero error and has not managed to fix or work around it. Even if you are a little short on time do you think you could take a look to see if you can figure out the divided by zero problem so we can forward test the current code?

    Everyone with decent coding skills is welcome to help, with real time stops and grid entries the system has huge potential 🙂

    #63234

    Hi Cfta!

    Nice to here that you are looking in to it. I’ll try to clean up my stopporder version so that we get rid of  the dbz error ! This one was only long and I havnt tried for shorts. But I’ll look into it.

    Can you share the ha and squeeze indicators as itf:s so that we have the same material.

    Regards

    Henrik

    #63250

    The division by zero error is, I think, coming from the FPP variable calculation, if you are not on market, countofposition is null. You should only do this calculation if you are ONMARKET.

    #63294

    Hello fellows,

    Thanks for the fast replies, here are the itf. files. The Squeeze is the more important one, the HA Change indicator is very useful but I think we can get rid of a lot of false signals if we replace it with Heiken Ashi Smoothed instead, if you think we can include it in the code. Maybe we can use this version Nicolas has made already (though we don’t need the bar painting function which I guess requires more calculations, it would be sufficient if it returns a 1 or -1 value but let’s use whatever is easier to code);

    https://www.prorealcode.com/prorealtime-indicators/hpt-heikin-ashi-smoothed/

     

     

    #65344

    Hi fellows,

    I have been developing the strategy further and made some progress thanks to the new marvelous Heiken Ashi of higher timeframes indicator developed by Nicolas;

    https://www.prorealcode.com/prorealtime-indicators/heikin-ashi-higher-hourly-timeframe/

    The below code is intended to be run M1 TF. The HA Change indicator has been posted here on the last couple of pages. Squeeze has been substituted for Bollinger Bandwidth which is a default indicator on PRT, it has a 20 period SMA on it.

    Conditions to go long are; HA Change and HA of higher TF (1) to be above zero and for BBW to be above its SMA and for the current period to be above the previous period.

    Conditions to go short are opposite for HA Change and HA of higher TF but the same for BBW and its SMA.

    Also note that I have set new conditions for adding on to a trade, “countofposition<3” on line 41, of course this can be removed or set at each traders discretion. BBW to be above its SMA and for the current period to be above the previous period.

    Exit is set to when HA of higher TF crosses zero. This seem to have nullified the BB Exit, I would like to have both in place but can’t figure out how to code it, advice is welcome.

    If Nicolas or any other skilled coder find time and manages to adapt the HA of higher TF for minutes we can easily make this strategy even better, for instance running it on M1 and use HA of higher TF for H1 as filter and M15 for entries and exits.

    PS. We are only one month from this thread’s 2 year anniversary 🙂

    Long;

    Short;

     

     

    2 users thanked author for this post.
Viewing 15 posts - 286 through 300 (of 308 total)

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