NASY: A hedge-trading grid EA

User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

NASY: A hedge-trading grid EA

Post by SteveHopwood »

SERIOUS WARNING
  • Most Forex traders lose all their money.
    Using the robot posted here in trading Forex does not guarantee success.
    Trading this robot could lead to serious financial loss.
    Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
    This is not a set-and-forget ea. There is no such thing and anyone who tells you there is, is either a liar or an idiot. It should quickly become obvious why manual intervention will be necessary from time to time.
    At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
    To trade this robot, you have to understand:
    • How to use EA's.
      Grid trading
      Hedging
DO NOT TRADE THIS EA ON A LIVE ACCOUNT. IT IS EXPERIMENTAL.

Ehup all

A few weeks ago, I received this pm from viracoccha (I have cut out the introductory stuff)

"EA makes buy&sell orders at the same time. It will continue for doing it after every certain price movements. For example if price goes up 50 pips then EA makes buy&sell order again. AND AT THIS moment it sets break even line (for example +4 pips) to previous buy order AND NOW appears TP (for example +2 pips) to previous sell order. (It is very important that break even line and TP appears when next step is executed). So why I don’t have tried that system is that I don’t have found EA what makes TP level when order are certain number of pips in wrong direction.
….. and when the price goes down 50 pips the EA makes buy&sell order and sets break even line (for example +4 pips) to previous sell order and TP (for example +2 pips) to previous buy order. This is same logic but opposite direction …. So THIS is basic movement. No matter does price goes up or down. And it continues makes orders …. Lot size is same and buy and sells holding balance also …..
Now…… when price moves over break even line (this can happened only after second wave, in my example it was 50 pips) then AT THIS moment EA sets SL (for example 10 pips) to opposite order at the SAME level.
Profit comes when price overpasses both lines( break even +4 pips and TP +2 pips). The only risk in this system is when the price don´t overpass both line.
I try make example:
Prize is 1.3000, buy and sells are in and there is nothing more, no lines …… price is 1.3500, another buy and sells was made AND now EA sets break even for previous buy (lets say +4 pips) and for previous sell it make TP (+2 pips) ….. so …. If it goes up then nothing happens … it just making every 50 pips sells and buys. But if it goes down from 1.3500 …then it took my profit 1.3004 and 6 pips down it takes again profit. Not loosing much then in 1.3004 it sets SL for sell order (SL is 1.3014 and TP is 1.2998). That risk zone is 6 pips at this case. But in forex there are always risk. 6 pips is not bad. In my opinion every next level should be larger lot size as previous.
"

I post the above so that all readers can check my understanding of all this. Clearly, English is not viracoccha's first language, so there is always the chance of something being lost in translation. Here is my understanding:
  • On starup, take buy and sell trades immediately. Imagining that the market then rises:
    at +50 pips (or the user-input TradeStepSize)
    • move the stop loss of the Buy trade to +4 (or the user input BreakEvenProfit).
      move the take profit of the sell trade to +2 (or the user input TakeProfit).
      Take out a further buy and sell with lot sizes of the previous trades multiplied by LotSizeIncrementer (default 1, so same lot size)
    From here, imagine the market falls and hits the Buy trade's BE stop loss:
    • Move the stop of the outstanding Sell trade to -10.
      Then, the market will either continue to fall and hit the Sell tp, at a combined profit of +6 pips overall, or rise to hit the sl, at a combined loss of -6 pips.
Vice versa should the market have fallen since sending the first two trades.

Rince and repeat. Every time the market moves by TradeStepSize, the process of moving stop/tp/open new trades begins again.

At least, I think it does. This little lot was a nightmare to code, so I do not guarantee that the algorithm I have constructed is watertight. All we can do is bung the EA on a demo and see if it works as intended.

Bear in mind that I have coded my understanding of all this. I may have misunderstood. It is not my strategy; questions about the strategy should be directed to viracoccha.

In conclusion
No idea where all this is heading. No idea if the strategy has long-term legs Let's see.

:D

Matters of general interest

Read this post:
http://www.forexfactory.com/showthread. ... ost4923611 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration. There is a thread devoted to Sam's trading method at http://www.forexfactory.com/showthre...25#post5118825

Masterly summary of hedging: http://www.forexfactory.com/showthread. ... ost4977179

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.forexfactory.com/showthread. ... ost4431794, at the bottom of the post.

Useful utilities/EA's/scripts
Matt's chart-population script at http://www.stevehopwoodforex.com/phpBB3 ... 5733#p5733. Use this every time you start a fresh platform.
MaryJane has posted a fabulous utility to allow us to resize EA input windows: http://www.forexfactory.com/showthread.php?t=299017
Multi purpose trade manager: http://www.forexfactory.com/showthread.php?t=89371
Account equity analyser: http://www.forexfactory.com/showthread. ... ost4693716 Also at http://www.forexfactory.com/showthread. ... ost4709098, which includes a template for both USD and the Euro.
Past-trades display indi by squalou; shows a graphical display of the success/failure of trades in your History tab. Breathtaking piece of work. http://www.forexfactory.com/showthread. ... ost3830610
My shell EA – the code I use to produce EA's so quickly. http://www.stevehopwoodforex.com/phpBB3 ... p?f=5&t=15
You do not have the required permissions to view the files attached to this post.
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
musketeer
Trader
Posts: 15
Joined: Wed Dec 14, 2011 3:05 am

Re: NASY: A hedge-trading grid EA

Post by musketeer »

OOTB EURUSD 1H last year, 0.1 lot flat, spread 3.0 pips http://screencast.com/t/Rcw5abwaIfiY
the equity/balance curve is ... sort of unique :)
the test takes ages to complete
Lex
Posts: 7
Joined: Tue Feb 21, 2012 11:38 pm

Re: NASY: A hedge-trading grid EA

Post by Lex »

Whoa, crazy, man!
User avatar
TehCount
Trader
Posts: 19
Joined: Wed Dec 21, 2011 6:49 pm
Location: East Coast, USA

Re: NASY: A hedge-trading grid EA

Post by TehCount »

LOL that is one strange backtest.
User avatar
viracoccha
Trader
Posts: 52
Joined: Wed Jan 11, 2012 6:34 pm

Re: NASY: A hedge-trading grid EA

Post by viracoccha »

Thank you Steve about that effort.
It seems that EA works fine. I will wait some real demo tests and I post here my parameters tomorrow. Standard settings is maybe not perfect .... but will see. If I made my tests different numbers then my graph was better as musketeers graph .... But one more thing ... this EA needs whole system restart in while, in that case it work, at least my test showed that. Important is but right amount of money and right lot size and another numbers. I post my results beginning of next week. I( newer trust backtest.
tarrini65
Trader
Posts: 21
Joined: Thu Nov 17, 2011 8:30 am

Re: NASY: A hedge-trading grid EA

Post by tarrini65 »

thre strategy has a weak point , it may open a lot of trades that will close someday ,with obviuos swapping cost and margin requirement .

it would be better to close all trades once a total profit is reached .

eg : a sell stop at break even , the buy start to gain , once sufficient pips are gain , close all and start again,
If that buy don't gain a lot it can be close at stop loss , there will be another that will do the job .....
User avatar
viracoccha
Trader
Posts: 52
Joined: Wed Jan 11, 2012 6:34 pm

Re: NASY: A hedge-trading grid EA

Post by viracoccha »

yes tarrini65 ... you have right ... if there is too many trades then you should restart whole system. All depends how much money you have AND which step you play ..... give me some time and I will give you direction how we can use that EA perfectly. This is EA is basic rock .... I want proof that grid system works. And this EA have one good sides too .... if you use normal settings then it cant blow your acc suddenly. I asked from my self "what happened if there are many trades inside?" .... now we can know that .... besides that we can use here treilings or automatic SL ..... here are many opportunities how to build your strategy. Find the weakest point for you and "fix" that.
User avatar
viracoccha
Trader
Posts: 52
Joined: Wed Jan 11, 2012 6:34 pm

Re: NASY: A hedge-trading grid EA

Post by viracoccha »

one more thing ... this EA works when market moves in both direction .... it dont earn when moving is only up or down and market always moving up and down
User avatar
nanningbob
Trader
Posts: 4564
Joined: Sun Dec 04, 2011 1:23 pm

Re: NASY: A hedge-trading grid EA

Post by nanningbob »

I have tested a similar type theory with an EA trading both directions at once. What happens is this, the DD builds until you have an absolute high and absolute low. Then the DD stays steady while price keeps taking profit between these two points. I tried this on ten pairs and I never seemed to have enough funds to cover the DD. The reason was I tried this during the 2008/09 whacky times. I always assumed this would work nicely on low volatile ranging pairs like the aud/nzd, aud/cad, chf/jpy or eur/gbp. eur/gbp not so non-volatile anymore. Currencies that peg themselves to the dollar probably would be great pairs to do this with like: hkd/usd or sgd/usd. Since USA brokers are no longer allowed to trade both ways at once I dropped the idea and went on to other things. So I would be interested in your idea.
I trade http://www.stevehopwoodforex.com/phpBB3 ... =38&t=3964,
I talk about my philosophy of trading here.
http://www.stevehopwoodforex.com/phpBB3 ... =38&t=3627
"The key to converting something useful to others is simplicity. Complexity is the enemy to execution." Tony Robbins
User avatar
nanningbob
Trader
Posts: 4564
Joined: Sun Dec 04, 2011 1:23 pm

Re: NASY: A hedge-trading grid EA

Post by nanningbob »

LOL Steve, I type br0ker and you change it to criminal. That is funny. broker broker broker. boker?? Put a zero in there but it doesnt change it though.
I trade http://www.stevehopwoodforex.com/phpBB3 ... =38&t=3964,
I talk about my philosophy of trading here.
http://www.stevehopwoodforex.com/phpBB3 ... =38&t=3627
"The key to converting something useful to others is simplicity. Complexity is the enemy to execution." Tony Robbins
Post Reply

Return to “Automated trading systems”