Grid maker 1.1Back to topics list | 1 2 3 4 5 |
|
hdb
2005.07.29 13:45
as a PS to my previous post:
If u do use GridMaker, you will see that it accumulates open orders. In order to avoid having lots of useless open orders (u dont need a buy 500 pips away from the current rate!), please run the following script periodically to remove all open unfilled orders. By setting the flag "allSymbols" to false, it will only remove the orders for one symbol. This will make our MT friends soooo happy !! PS This is a script so put it with the other scripts in the /script folder
//+------------------------------------------------------------------+
//| RemoveAllGrids.mq4 |
//| Copyright © 2005, hdb |
//| http://www.dubois1.net/hdb |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, hdb"
#property link "http://www.dubois1.net/hdb"
//#property version "1.2"
extern string GridName = "Grid";
extern int uniqueGridMagic = 11111; // Magic number of the trades. must be unique to identify
extern bool allSymbols = true; // If true, this will remove ALL grid open orders, otherwise just the pair associated with the graph
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
#property show_inputs // shows the parameters
//----
int total = OrdersTotal();
int i ;
for(i=total-1; i>=0;i--)
{
OrderSelect(i, SELECT_BY_POS);
int type = OrderType();
if ( (OrderSymbol()==Symbol() || (allSymbols == true)) && ( (OrderMagicNumber() == uniqueGridMagic) || (OrderComment() == GridName)) ) // only look if mygrid and symbol...
{
bool result = true;
if ( type > 1 ) result = OrderDelete( OrderTicket() );
if(result == false)
{
// Alert("Order " , OrderTicket() , " failed to close. Error:" , GetLastError() );
// Sleep(3000);
}
}
}
//----
return(0);
}
//+------------------------------------------------------------------+
|
|
hdb
2005.07.29 14:10
Lastly, for today, here is an update of the grid statistics for the week:
Balance 110k ( start 49k) Equity 53k (start 49k) Margin used 26k Available 26k Open P&L -57k
|
|
Pip
2005.10.11 23:27
I would like to double check on which time frame the gridmaker v1.8 expert should be attached to?
|
|
hardwood
2005.10.20 18:55
Pip,
From the code, it appears that it is not important unless you make use of the EMA or MACD flags.. in which case my guess is 5 mins is the minimum.. just try different time periods. Best regards, Hugh |
|
ElCapo
2005.10.22 18:59
In backtesting the grid I can't ssem to get it to enter into any buy trades. It only does sell trades. Everything is set correctly in the settings. Is it supposed to do this. I am using MT4 latest build.
|
|
hardwood
2005.10.25 03:17
ElCapo,
In my experience, this type of EA does not back test well and I have seen some real strange results. I now always test longs, shorts and both as three different tests to make sure that both is the sum of longs and shorts (off course, if the strategy implies it should). Try a forward test for a few days.. I'm sure you will get both longs and shorts. Best regards, Hugh |
|
MingChen
2006.02.24 12:19
I think it's wrong to give direction judgment.
So, UseMACD and limitEMA should be set false. |
|
badawi
2006.06.12 15:47
DEAR hdp
TALKING TO THE POINT, THE EA IS SO GOOD BUT I NEED SOME HELP FROM YOU IN THE CODE INSIDE THE EA? WELL.... ON STTEING UP THE EA ON THIS CONDITIONS AS FOLLOW: extern int uniqueGridMagic = 11111; extern double Lots = 0.1; extern double GridSize = 3; extern double GridSteps = 12; extern double TakeProfit = 30; extern double StopLoss = 20; extern double UpdateInterval = 1; extern bool wantLongs = true; extern bool wantShorts = true; extern bool wantBreakout = true; extern bool wantCounter = false; extern bool limitEMA = false; extern int EMAperiod = 34; extern double GridMaxOpen = 0; extern bool UseMACD = true; extern bool CloseOpenPositions = false; THE PROBLEM THAT I WANT IT TO BE SOLVED IS: WENE IT OPENS ORDER WITHIN THE GRIDSTEPS WITH THE GRIDSIZE UNDER THE CURRENT PRICE ON THE CHART IT PLACES ANOTHER ORDER IF THE CURRENT PRICE GO'S UP OR DOWN FOR ONE GRIDSIZE. WHAT I WANTED TO BE OR TO BE RECODED IS: WENE EA PLACES ORDERS WITHIN THE GRIDSTEPS NO OTHER PLACING ORDERS UNTILL THE CURRENT PRICE GO'S UP BY THE SAME NUMBER OF GRIDSTEPS OR THE CURRENT PRICE GO'S DOWN BY THE SAME NUMBER OF GRIDSTEPS, AFTER THAT THE EA PLACES ANOTHER ORDERS INSIDE NEW GRIDSTEPS DEPENDING ON THE EA CONDITIONS AND CURRENT PRICE. IF THIS CODE IS SOLVED I THINK THE EA WILL MORE PROFITABLE |
