Free Grid Trading, The New Grid EA - page 4

 

Hi Daniel,

Thanks for your explanation.

I do understand it.

But I can't explain the fact I have 13 open trades, all opened on 1.5110

4 doubles in the same minute.

To avoid this it would be much better having it wait until the price gets to the TP before opening a new trade on the grid line.

If you want, I can give you access to my my demo account.

That might give a good view of my situation.

 

Clarification needed please...

In order for us to best use this trading tool please give the following detailed information once you test the EA :

  • Which currency pair you chose
  • The exact parameters you used for trading
  • The time period in which you tested the EA
  • Why you chose the specific range and settings you decided to trade
  • The trading statement showing the trades taken by the EA

With this information, fellow traders will be able to examine the performance of the EA based on the criteria used to select the grid's range as well as the exact parameters used on the actual grid. Thank you all for your contributions, I am glad I have been able to help

===============================================

Daniel, what attracted me to your Thread is the concept of "Grid trading" and seeing that I am keen on the Gann Grid, I followed your explanations with great interest. It is for sure not Gann Grid and I take this opportunity to ask you how these Grid figures are determined, please.

I download the EA out of curiosity and am running it as default on GBP/USD M-5. It has made 3 entries since yesterday and I left it unattended over night. Drawback was some -60 pips, but it ended with a +39 trade when I closed it.

Top left hand side of the chart, it tells me the following:

Grid from 1.2465 to 1.8465

Closest Grid line to enter trade is 1.6665 at present, but it was 1.6565 earlier.

Distance between lines is 100 pips.

Number of Grid lines is 30.

Max number of trades is 30.

You ask the question here that we should tell you "why we have selected the specific range that we have selected", but I could not find an explanation as to how one gets to establishing the range in the first place?

I would appreciate some guidelines along the questions I have asked and look forward to hearing from you.

Best wishes,

 

thanks a lot for that EA , i am backtesting it on EURCHF H1 ,

from the period 1/1/2009 till near 1/9/2009 it work ok ,

but from september 1/9/2009 till now , it didnt open except 3 trades , leaving the trades before 1/9/2009 open !

i am using the current setting in the newest code , but i cant figure what the problem is

can you help me please ?

also when i try to change lot size to 0.01 it send me error 131

 

How to determine a grid...

danielfppps:
In order for us to best use this trading tool please give the following detailed information once you test the EA :
  • Which currency pair you chose
  • The exact parameters you used for trading
  • The time period in which you tested the EA
  • Why you chose the specific range and settings you decided to trade
  • The trading statement showing the trades taken by the EA

With this information, fellow traders will be able to examine the performance of the EA based on the criteria used to select the grid's range as well as the exact parameters used on the actual grid. Thank you all for your contributions, I am glad I have been able to help

===============================================

Daniel, what attracted me to your Thread is the concept of "Grid trading" and seeing that I am keen on the Gann Grid, I followed your explanations with great interest. It is for sure not Gann Grid and I take this opportunity to ask you how these Grid figures are determined, please.

I download the EA out of curiosity and am running it as default on GBP/USD M-5. It has made 3 entries since yesterday and I left it unattended over night. Drawback was some -60 pips, but it ended with a +39 trade when I closed it.

Top left hand side of the chart, it tells me the following:

Grid from 1.2465 to 1.8465

Closest Grid line to enter trade is 1.6665 at present, but it was 1.6565 earlier.

Distance between lines is 100 pips.

Number of Grid lines is 30.

Max number of trades is 30.

You ask the question here that we should tell you "why we have selected the specific range that we have selected", but I could not find an explanation as to how one gets to establishing the range in the first place?

I would appreciate some guidelines along the questions I have asked and look forward to hearing from you.

Best wishes,

Hi Valeo.

In my Opinion, the best way to define a grid for a certain currencypair, is to take the all-time highest value (GBPUSD = 2.1161), add the all-time lowest (GBPUSD = 1.3501) and then divide the sum by 2. This gives you the average value (GBPUSD = 1.7331) the currencypair has, from a historical perspective.

When u determine the range of the grid, u have to set a minimum value below the all-time lowest (for safety), with GBUSD that could be 1.0331 - this is 7000 pips from our average value. With 100 pips pr. gridline that gives us 70 gridlines in all. NewGrid automatically makes 70 gridlines towards the highend value, which in this case would be 2.4331. Now, the most important part, is to define the lotsize for this grid. You have to calculate the pipvalue for the given currencypair, fortunately thats easy for GBPUSD, as the pipvalue for the dollar is $0.1 pr micro-lot. To cover the grid from average to lowest (or highest) value with 100 pips between the gridlines you would have a theoretical loss of 100 pips*$0.1 = $10 for each trade. Now, IF NewGrid was only opening one trade pr. gridline the formula to cover the grid would be (Gridlines*(gridlines+1)/2 * distance between gridlines * pipvalue) in our case 70 * 71 / 2 *100 * $0.1 = $24850 This is the amount you should have the least to be absolutely safe to trade this grid in the worst case scenario.

If you think the range will never again step outside the current highs and lows, the grid is only 3830 pips from average to bottom/top, and the account should have (rounded) 39*40/2*100*$0.1 = $7800. In these to cases you should be covered, but no one can tell the future, right? Because of these high numbers you should consider the EURCHF instead - approxx. 2500 pips from top till bottom in history and covering 3000 pips would only require 15 gridlines on each side of the average (1.5571): 15*16/2*100*$0.1 = $1200.

Maybe you won't have as many trades, but you don't need as high an accountbalance to cover the grid, making you able to trade higher lotsizes instead. Remember, if you are on a broker who doesn't trade micro-lots you have to multiply the needed accountbalances with 10 to be safe trading 0.1-lotsizes.

 

Thanks for the post!

That's exactly how I calculated my highs, lows and range for both EURCHF and AUDNZD.

I set my grids manual according the calculations

And that's working fine for both pairs.

Newgrid EA has taken a lot of trades on the same price and blow up my demo account

 

Determining lotsizes

Thx for feedback.

I got thinking about the way newgrid trades more times on one gridline, and how we should compensate for that, when we calculate the required accountbalance to safely trade any one grid.

The easy, but a little scary way, is to simply multiply the calculated accountbalance with a certain factor, let's say 3 or 4, then backtest this figure in a period 2 or 3 months prior to the historical high or low, getting both values in the test and continue up until present day. This way we should be reasonably sure of the grid not blowing our accounts...

 

Hello Everyone,

I would like to thank all of you for participating on the thread. Now I would like to answer some of the questions you have brought forward :

@valeofx : Grid trading is supposed to be used as a way to take advantage on a fixed range that exists on a given currency pair. The nature by which the range is defined depends on the intention in which the grid is traded. It can be a consolidation range that has been established for a few weeks, a long term historical range as it was pointed out later by thorup or any other range that may be thought to have been established on a currency pair on timeframes from minutes to years. Knowing which range to trade and how to trade it is essential to success with grid trading.If you trade grid systems without consciously knowing at which moment to enter the range and why you enter the range you WILL lose all your account's equity. As I said throughout the thread, grid trading is inherently very dangerous and should only be used by experienced traders seeking to profit from fixed ranges. It is NOT a set and forget strategy.

@seawinde : The problem may be that the EA reached the maximum number of trades. If this number is reached the EA will stop trading until it closes some trades. You can either increase this number or increase your grid separation so that there is more space between trades.

@martinsta : You are right, after forward testing for a while I did find that there is a problem which is absent in backtesting regarding order openings. This has been fixed with a new EA version.

@thorup : Thank you for your posts, your notions on risk and the definition of the grid are indeed correct. The only problem being that picturing risk in this way assumes that the range will always hold. This is most likely NOT the case and this is the reason why grid trading is dangerous when used as a set and forget strategy. In order to avoid excessive draw downs I would advice to ONLY use grid trading after tests of support or resistance from the range's bottom or top, this eliminates the excessive draw down that is carried from open positions near the center point of the grid.

In order to fix the points that have been raised I have coded several modifications to the EA that should eliminate the problems pointed out by martinsta. The EA will now only trade ONCE per grid line and will only open a new trade on the grid line IF the previous trade is closed. This will also make risk easier to calculate as thorup had pointed out. In order to make risk calculations easier I also added a comment that displays the amount of dollars risked if all trades on the grid were to be unprofitable. In order for this to work you need to give the new variable "pipvalue" the value in dollars of each pip with the lot size you are trading. I also attach the ten year backtest of the EA on the EUR/CHF with the default settings (on the new EA)(backtest is from Jan 01 2000 to Nov 11 2009). Please test it and point out any errors or suggestions you may have

Again, I would like to thank all of you for participating,

Daniel

Files:
newgrid.gif  9 kb
newgrid_2.mq4  4 kb
 
ValeoFX:

Hi Valeo.

In my Opinion, the best way to define a grid for a certain currencypair, is to take the all-time highest value (GBPUSD = 2.1161), add the all-time lowest (GBPUSD = 1.3501) and then divide the sum by 2. This gives you the average value (GBPUSD = 1.7331) the currencypair has, from a historical perspective.

When u determine the range of the grid, u have to set a minimum value below the all-time lowest (for safety), with GBUSD that could be 1.0331 - this is 7000 pips from our average value. With 100 pips pr. gridline that gives us 70 gridlines in all. NewGrid automatically makes 70 gridlines towards the highend value, which in this case would be 2.4331. Now, the most important part, is to define the lotsize for this grid. You have to calculate the pipvalue for the given currencypair, fortunately thats easy for GBPUSD, as the pipvalue for the dollar is $0.1 pr micro-lot. To cover the grid from average to lowest (or highest) value with 100 pips between the gridlines you would have a theoretical loss of 100 pips*$0.1 = $10 for each trade. Now, IF NewGrid was only opening one trade pr. gridline the formula to cover the grid would be (Gridlines*(gridlines+1)/2 * distance between gridlines * pipvalue) in our case 70 * 71 / 2 *100 * $0.1 = $24850 This is the amount you should have the least to be absolutely safe to trade this grid in the worst case scenario.

If you think the range will never again step outside the current highs and lows, the grid is only 3830 pips from average to bottom/top, and the account should have (rounded) 39*40/2*100*$0.1 = $7800. In these to cases you should be covered, but no one can tell the future, right? Because of these high numbers you should consider the EURCHF instead - approxx. 2500 pips from top till bottom in history and covering 3000 pips would only require 15 gridlines on each side of the average (1.5571): 15*16/2*100*$0.1 = $1200.

Maybe you won't have as many trades, but you don't need as high an accountbalance to cover the grid, making you able to trade higher lotsizes instead. Remember, if you are on a broker who doesn't trade micro-lots you have to multiply the needed accountbalances with 10 to be safe trading 0.1-lotsizes.

==========================================================

Many thanks for the explanation, Thorup. I have just learned something new again and will switch the EA to EUR/CHF to see what happens.

Best wishes.

 

Thanks Daniel...

Hello Everyone,

I would like to thank all of you for participating on the thread. Now I would like to answer some of the questions you have brought forward :

@valeofx : Grid trading is supposed to be used as a way to take advantage on a fixed range that exists on a given currency pair. The nature by which the range is defined depends on the intention in which the grid is traded. It can be a consolidation range that has been established for a few weeks, a long term historical range as it was pointed out later by thorup or any other range that may be thought to have been established on a currency pair on timeframes from minutes to years. Knowing which range to trade and how to trade it is essential to success with grid trading.If you trade grid systems without consciously knowing at which moment to enter the range and why you enter the range you WILL lose all your account's equity. As I said throughout the thread, grid trading is inherently very dangerous and should only be used by experienced traders seeking to profit from fixed ranges. It is NOT a set and forget strategy.

=========================================

Much appreciated, Daniel.

Success!

 

Please, can I?

Daniel i have a question.

If I were to make a minor modification that could make the EA compounding, would u mind if I posted it here?

For now, I'm posting a statement showing what it'll do to the results the newgrid is making.

I've done some backtesting on the EURCHF with 15 pips between gridlines and 15 pips TP on an FXOpen Micro-account, and the one i'm posting here is the one where the drawdown is less than 55% over the entire sept. 1999 to present day timeperiod. Unfortunately, I can only have 100 open trades on FXOpen, and that limits the grid making it impossible to make advantage of the extreme values - from 2001.05.07 to 2003.06.06 I didn't have a single trade because of this limitation. I'll do some backtesting on FXCM aswell because of their 1000 open trades limit, but since they don't have microaccounts with MT4 I would have to have a minimum accountbalance around 100,000$ (not quite there yet )

Sidenote: Since the maximum balance on a FXOpen micro-account is 3000$ with high leverage, one would have to open a standard account and transfer funds until the balance can cover the entire gridrange (or have multiple microaccounts). In my statement i've started out with 1000$ which translates to 100000c (so u'll have to divide the tested profits with 100 to get the dollars....)

Reason: