Is it possible to build a hedging system in ProRealCode?

Forums ProRealTime English forum ProOrder support Is it possible to build a hedging system in ProRealCode?

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

    I recently purchased an EA for MT4 which is essentially a hedging robot that works on a grid principle of sorts. It’s for running on The Dow by itself.

    It places both long and short positions/orders to run at the same time, but it doesn’t use stops, it just increases position sizing at levels further from the initial entry. It keeps opening these orders at consistent levels as price moves wider from the initial entry until there’s a profit of X and then will just close down all open trades and cancel all pending orders. It’s been incredibly consistent in banking profits and looking at the verified MyFxBook of the robot when tested on a £5k account this year it’s up over 90%.

    I’ve started manually trading this way to understand it better and if you can allow yourself loads of room for margin by starting very small, and are happy to watch the charts closely to keep adjusting the levels to be the right stake each time, then it works with a successful win rate of around 75% and a profit factor of 1.25 +/-. (https://www.myfxbook.com/members/sandctrading/beastmode-yldfx-live/4802208)

    Now, I’m not a big MT4 fan, I love ProRealTime, but I’d wanted to buy this EA for a while and was willing to give it a whirl. But I’d love to learn how to create such a system to auto trade in PRT.

    Is it possible? Would anyone be interested in attempting a build of it?

    Thanks for your interest and any comments welcome!

    Stay safe traders and coders!

    Matt

    #152547

    ProOrder doesn’t allow hedging, whenever you open a trade in any direction all open trades in the opposite directions, if any, are closed (Stop & Reverse).

     

    #152551

    Hello Matt,

    Be very careful with this robot. When you look closely at the statistic report, you will note  that most of the performance was done in march and april when there was a lot of volatility.

    Losing trades are 4 times bigger than winning ones. Several consecutive losing trades can ruin your performance and crash your account.

     

    1 user thanked author for this post.
    #152553

    The profit curve of the system in your link looks like a typical Martingale system. It seems to be one, as you say it keeps increasing position sizes until there is a profit.

    There comes a time in all Martingale systems when they fail horrendously, generating huge losses when a big cumulated position size is positioned in the wrong direction and all previous gains are wiped out in a short time. Martingale always fails and is never recommendable. Just a matter of time.

    1 user thanked author for this post.
    #152567

    Seems to be a typical surefire hedging system. Not profitable in a long run. If the global profit is positive but with an “Average loss” superior to “Average win”, it is using martingale position sizing to recover losses.

    Hedging position is not possible with ProOrder.

    1 user thanked author for this post.
    #152573

    Thank you to everyone for kindly taking the time to send me a response, and also for your forewarning that I will look into immediately, and pause the EA in the meantime.

    Although it does look like a Martingale style structure the difference as far as I can gather is that:

    1) It enters a trade based on a stochastics trigger to find a pullback and a confluent multi-time frame that matches up with the 50/200EMAS on the intraday chart. So it’s better than a coin flip entry (like with Martingale)

    2) It goes both long and short, not just long. So if the trade does go against the entry then the system tries to trade the other way rather than just piling more money into the same trend direction as the entry.

    3) It doesn’t double bet sizing with each new order. It uses increments that stay the same and are half that of the entry. So if you enter long with a stake of $1pp then the next order above it would be $1.5pp. The next order below it (say 120 pips) would be the same size as the entry ($1pp) and if the momentum continued to the downside then it’d look to add $0.5pp increments. This is opposed to classic Martingale of doubling bet size in the same direction until you run out of money.

    The trade is exited, as far as I can tell once the P/L is in profit and an exit signal on stochastics is triggered (although I think there may be a volatility parameter in there too where it exits after a spike if P/L is in profit.

    So, I think it’s slightly different, but what you guys have all said has made me pause the system and I’m going to take today and the weekend to look into this more closely.

    Appreciate the support and knowledge as ever!

    Have a great day!

    #152574

    Definition of hedging: Placing a bet and then at some point realising you got it wrong and so then opening a larger bet in the opposite direction and then at some point realising that you got that wrong too and so you open another bigger bet in the original direction which you hope is finally a correct bet because if it isn’t then you will need to phone your bank manager and ask to borrow some money so that you can place some more and even bigger wrong bets!

    Otherwise known as suicidal trading unless you want to win very small and use a mahoosive capital to do it….and even then one day you might loose all of the mahoosive capital.

    #152584

    Thank you for sharing this Augustus, very interesting!

    As a result of following your fx link, then checking my trading email account I noted that myfxbook made a request to me (Jan 2020) to access our Snippett Link Library.

    In case you are not familiar with this, here is the link …

    Snippet Link Library

    I’m a nosey beggar so if you don’t mind sharing how much per month is the rental of the EA / Signals on your fx link please?

    If you don’t want to share, no probs, my curiosity will make me complete the copy request to find out! 🙂

    #152591

    I did something similar before, I have 2 sets of system, 1 long, 1 short. Both will open trade at same time. Then the position size of the trade opens of both side is depending on which has more bias. The winning basic is on the fact of money management like trailing. The total gain is by summing the result of both side.

    I coded it very quickly but I stop working on them as result not tremendous. I didn’t run in demo or live too. I was going to delete it anyway, but in case you are interested, feel free to make use of it. It was done so long ago (maybe a year), I may not able to provide you too much explanation except I spend time on it (which I’m not sure worth to)

    PS: As I’m not promoting it, thus I’m not posting the code in the page, but attaching the .itf for use, time zone is UTC+8, TF is 1m

    1 user thanked author for this post.
    #152596

    If the gain% matters, you can just increase the contract size to 4. As it is “hedged”, so I think margin won’t be high. Over 6 months, it can gain 55%, if result was the same for another 6 months, it will be 110%

    But if you ask me, honestly I won’t run it 🙂

    1 user thanked author for this post.
    #152635

    Hey no probs, I don’t pay anything for the EA per month. I bought it for a one-off cost via Samuel & Co Trading (UK based REGULATED prop firm and training provider) in Watford.

    #152636

    Hey, this sounds fascinating, thanks for sharing your work. It’ll probably all be double dutch to me in all honestly, but I’ll defo take a look at this over the weekend and see what logic is in there.

    It’s a fascinating system, I’ve been trying to think of what market price action would scupper it, and the only thing I can think of is if the price keeps fluctuating up and down larger and larger, sort of like a reverse wedge (getting wider) BUT without moving any higher. So by that I mean a non-ascending or descending wedge. Because this would keep opening larger positions at each extreme and depending on your account size it might throttle your margin.

    However, I use £0.02 open bet and £0.01 additional increments on top of that to grow the positions. And my account size is £20k+ so I have plenty of margin on the 500:1 leveraged account with AxiTrader.

    I think that as long as you keep bet sizes small and that market move up or down over time then this system makes good steady profits.

    I think it does look rather scary from the outside, but I’d be happy to try and show some examples of how it trades, but I guess it’s redundant in here as it appears ProRealCode doesn’t support hedging systems per se.

    Thanks again for sharing the code, I’ll check it out at the weekend.

    Matt

     

    #152648

    I never quite understood the purpose of “hedging” when you do it in the same instrument. Instead of having a long position and opening a short position at the same time to “hedge”, you can as well close the long position and hold no position at all to obtain the same result. This saves a lot of transaction costs. Hedging on the other hand makes the broker happy.

    #152654

    ProRealCode doesn’t support hedging systems per se.

    We can hedge with manual trades on PRT  / IG; never understood why not therefore on AutoTrading?

    It may come one day?

    #152655

    I never quite understood the purpose of “hedging” when you do it in the same instrument.

    I do it sometimes if I have, for example, a DJI short trade on a 1 hour TF (price still going down over 1 hour market structure) but I see a short term opportunity on 5 second or 1 min TF for a DJI long trade to make £20 to £40 ish.

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

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