Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #121 (permalink)  
Old 03-01-2007, 06:28 AM
moneymaxs's Avatar
Member
 
Join Date: Sep 2006
Posts: 86
moneymaxs is on a distinguished road
PHP Code:
25315847    2007.02.28 09:35    buy    0.10    gbpusd    19.568    19.530    19.585    2007.02.28 11:05    19.585    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
25313556    2007.02.28 09:25    buy    0.10    gbpusd    19.545    19.507    19.562    2007.02.28 09:35    19.562    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
25311707    2007.02.28 09:20    buy    0.10    gbpusd    19.524    19.486    19.541    2007.02.28 09:25    19.541    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
25295822    2007.02.28 08:23    buy    0.10    gbpusd    19.558    19.520    19.575    2007.02.28 09:20    19.520    0.00    0.00    0.00    -38.00
                                    12345    
[sl]            
25275148    2007.02.28 07:10    buy    0.10    gbpusd    19.595    19.557    19.612    2007.02.28 08:22    19.557    0.00    0.00    0.00    -38.00
                                    12345    
[sl]            
25272448    2007.02.28 07:00    buy    0.10    gbpusd    19.622    19.584    19.639    2007.02.28 07:09    19.584    0.00    0.00    0.00    -38.00
                                    12345    
[sl]            
25217548    2007.02.28 00:16    buy    0.10    gbpusd    19.626    19.588    19.643    2007.02.28 05:57    19.629    0.00    0.00    0.00    3.00
                                    12345                
25195464    2007.02.27 21
:21    buy    0.10    gbpusd    19.607    19.569    19.624    2007.02.27 22:45    19.624    0.00    0.00    -0.12    17.00
                                    12345    
[tp]            
25180449    2007.02.27 20:14    buy    0.10    gbpusd    19.619    19.578    19.633    2007.02.27 21:10    19.608    0.00    0.00    0.00    -11.00
                                    12345                
25059363    2007.02.27 09
:32    sell    0.10    gbpusd    19.638    19.676    19.621    2007.02.27 19:56    19.630    0.00    0.00    0.00    8.00
                                    12345                
25043907    2007.02.27 08
:32    sell    0.10    gbpusd    19.657    19.695    19.640    2007.02.27 09:31    19.640    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24931866    2007.02.26 19:52    sell    0.10    gbpusd    19.640    19.678    19.623    2007.02.27 06:14    19.630    0.00    0.00    0.04    10.00
                                    12345                
24890748    2007.02.26 15
:47    sell    0.10    gbpusd    19.629    19.667    19.612    2007.02.26 16:41    19.616    0.00    0.00    0.00    13.00
                                    12345                
24876580    2007.02.26 14
:43    sell    0.10    gbpusd    19.629    19.667    19.612    2007.02.26 15:28    19.622    0.00    0.00    0.00    7.00
                                    12345                
24707548    2007.02.23 16
:13    sell    0.10    gbpusd    19.627    19.667    19.612    2007.02.26 09:04    19.612    0.00    0.00    0.04    15.00
                                    12345    
[tp]            
24681359    2007.02.23 14:22    sell    0.10    gbpusd    19.636    19.674    19.619    2007.02.23 16:05    19.619    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24663909    2007.02.23 12:51    sell    0.10    gbpusd    19.603    19.641    19.586    2007.02.23 14:22    19.641    0.00    0.00    0.00    -38.00
                                    12345    
[sl]            
24651495    2007.02.23 10:19    sell    0.10    gbpusd    19.565    19.605    19.550    2007.02.23 12:51    19.605    0.00    0.00    0.00    -40.00
                                    12345    
[sl]            
24637987    2007.02.23 09:04    sell    0.10    gbpusd    19.571    19.609    19.554    2007.02.23 09:32    19.554    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24628192    2007.02.23 07:42    sell    0.10    gbpusd    19.592    19.630    19.575    2007.02.23 09:04    19.575    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24578419    2007.02.22 20:00    sell    0.10    gbpusd    19.561    19.599    19.544    2007.02.23 07:41    19.599    0.00    0.00    0.04    -38.00
                                    12345    
[sl]            
24569154    2007.02.22 18:00    sell    0.10    gbpusd    19.581    19.619    19.564    2007.02.22 19:59    19.564    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24514534    2007.02.22 09:57    buy    0.10    gbpusd    19.501    19.463    19.518    2007.02.22 15:21    19.518    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24509789    2007.02.22 09:28    buy    0.10    gbpusd    19.503    19.462    19.517    2007.02.22 09:35    19.517    0.00    0.00    0.00    14.00
                                    12345    
[tp]            
24493565    2007.02.22 07:51    buy    0.10    gbpusd    19.479    19.441    19.496    2007.02.22 09:28    19.496    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24481184    2007.02.22 07:15    buy    0.10    gbpusd    19.513    19.475    19.530    2007.02.22 07:51    19.475    0.00    0.00    0.00    -38.00
                                    12345    
[sl]            
24415972    2007.02.21 16:13    sell    0.10    gbpusd    19.530    19.568    19.513    2007.02.22 07:15    19.513    0.00    0.00    0.12    17.00
                                    12345    
[tp]            
24368860    2007.02.21 13:00    sell    0.10    gbpusd    19.540    19.578    19.523    2007.02.21 13:30    19.523    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24322035    2007.02.21 09:29    sell    0.10    gbpusd    19.553    19.591    19.536    2007.02.21 09:32    19.536    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24304123    2007.02.21 08:00    sell    0.10    gbpusd    19.562    19.600    19.545    2007.02.21 09:29    19.545    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24207331    2007.02.20 17:01    sell    0.10    gbpusd    19.545    19.583    19.528    2007.02.21 03:51    19.528    0.00    0.00    0.04    17.00
                                    12345    
[tp]            
24197509    2007.02.20 15:28    sell    0.10    gbpusd    19.558    19.596    19.541    2007.02.20 16:29    19.541    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24190374    2007.02.20 14:00    sell    0.10    gbpusd    19.524    19.562    19.507    2007.02.20 15:28    19.562    0.00    0.00    0.00    -38.00
                                    12345    
[sl]            
24136146    2007.02.20 04:29    sell    0.10    gbpusd    19.534    19.572    19.517    2007.02.20 08:02    19.517    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24133989    2007.02.20 03:54    sell    0.10    gbpusd    19.539    19.577    19.522    2007.02.20 04:28    19.539    0.00    0.00    0.00    0.00
                                    12345                
24133568    2007.02.20 03
:36    sell    0.10    gbpusd    19.535    19.573    19.518    2007.02.20 03:53    19.538    0.00    0.00    0.00    -3.00
                                    12345                
24132303    2007.02.20 03
:00    sell    0.10    gbpusd    19.538    19.576    19.521    2007.02.20 03:14    19.536    0.00    0.00    0.00    2.00
                                    12345                
24112644    2007.02.19 22
:24    sell    0.10    gbpusd    19.516    19.554    19.499    2007.02.19 22:56    19.514    0.00    0.00    0.00    2.00
                                    12345                
24105223    2007.02.19 18
:04    sell    0.10    gbpusd    19.535    19.573    19.518    2007.02.19 18:26    19.519    0.00    0.00    0.00    16.00
                                    12345                
24092704    2007.02.19 14
:32    buy    0.10    gbpusd    19.453    19.415    19.470    2007.02.19 15:53    19.470    0.00    0.00    0.00    17.00
                                    12345    
[tp

why i like this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #122 (permalink)  
Old 03-01-2007, 06:34 AM
moneymaxs's Avatar
Member
 
Join Date: Sep 2006
Posts: 86
moneymaxs is on a distinguished road
PHP Code:
25221608    2007.02.28 00:43    sell    0.10    eurusd    13.237    13.275    13.220    2007.02.28 01:11    13.220    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
25194317    2007.02.27 21:12    sell    0.10    eurusd    13.240    13.278    13.223    2007.02.27 23:40    13.233    0.00    0.00    0.59    7.00
                                    12345                
25176425    2007.02.27 19
:57    sell    0.10    eurusd    13.242    13.280    13.225    2007.02.27 21:10    13.239    0.00    0.00    0.00    3.00
                                    12345                
25038015    2007.02.27 08
:20    sell    0.10    eurusd    13.215    13.415    13.095    2007.02.27 19:57    13.243    0.00    0.00    0.00    -28.00
                                    12345                
24779235    2007.02.26 06
:44    sell    0.10    eurusd    13.183    13.221    13.166    2007.02.26 08:45    13.166    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24761419    2007.02.26 03:37    sell    0.10    eurusd    13.196    13.234    13.179    2007.02.26 06:10    13.179    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24708048    2007.02.23 16:17    sell    0.10    eurusd    13.162    13.200    13.145    2007.02.26 03:37    13.200    0.00    0.00    0.59    -38.00
                                    12345    
[sl]            
24695252    2007.02.23 15:17    sell    0.10    eurusd    13.178    13.177    13.161    2007.02.23 16:04    13.161    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24678388    2007.02.23 14:07    sell    0.10    eurusd    13.143    13.181    13.126    2007.02.23 15:17    13.181    0.00    0.00    0.00    -38.00
                                    12345    
[sl]            
24585605    2007.02.22 22:03    buy    0.10    eurusd    13.126    13.127    13.143    2007.02.23 14:07    13.143    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24485296    2007.02.22 07:34    buy    0.10    eurusd    13.109    13.109    13.126    2007.02.22 16:21    13.126    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24324153    2007.02.21 09:33    buy    0.10    eurusd    13.145    13.107    13.162    2007.02.22 07:34    13.107    0.00    0.00    -1.97    -38.00
                                    12345    
[sl]            
24260006    2007.02.21 04:00    buy    0.10    eurusd    13.138    13.100    13.155    2007.02.21 07:17    13.155    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24224991    2007.02.20 22:05    buy    0.10    eurusd    13.139    13.101    13.156    2007.02.21 00:00    13.146    0.00    0.00    0.00    7.00
                                    12345                
24200430    2007.02.20 16
:00    sell    0.10    eurusd    13.153    13.191    13.136    2007.02.20 16:29    13.143    0.00    0.00    0.00    10.00
                                    12345                
24136088    2007.02.20 04
:29    sell    0.10    eurusd    13.175    13.213    13.158    2007.02.20 07:59    13.158    0.00    0.00    0.00    17.00
                                    12345    
[tp]            
24134032    2007.02.20 03:56    sell    0.10    eurusd    13.179    13.217    13.162    2007.02.20 04:28    13.179    0.00    0.00    0.00    0.00
                                    12345                
24133660    2007.02.20 03
:39    sell    0.10    eurusd    13.179    13.217    13.162    2007.02.20 03:53    13.176    0.00    0.00    0.00    3.00
                                    12345                
24113634    2007.02.19 22
:56    sell    0.10    eurusd    13.155    13.193    13.138    2007.02.19 22:58    13.153    0.00    0.00    0.00    2.00
                                    12345                
24106646    2007.02.19 18
:35    sell    0.10    eurusd    13.154    13.192    13.137    2007.02.19 22:56    13.156    0.00    0.00    0.59    -2.00
                                    12345                
24101314    2007.02.19 17
:10    sell    0.10    eurusd    13.149    13.187    13.132    2007.02.19 18:26    13.153    0.00    0.00    0.00    -4.00
                                    12345 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #123 (permalink)  
Old 03-02-2007, 10:07 AM
Senior Member
 
Join Date: Mar 2006
Posts: 104
Oligarh is on a distinguished road
Hi. It's demo live.
Attached Images
File Type: gif DetailedStatementE2.gif (6.1 KB, 392 views)
Attached Files
File Type: htm DetailedStatementE2.htm (162.6 KB, 146 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #124 (permalink)  
Old 03-02-2007, 12:57 PM
BrunoFX's Avatar
Senior Member
 
Join Date: Sep 2005
Posts: 816
BrunoFX will become famous soon enough
Quote:
Originally Posted by bluto
P
#property copyright "Copyright © 2006, Expert Advisors"
#property link "http://forex-soft.netfirms.com"

extern int MaxTrades = 4;
extern int Pips = 5;
extern double TakeProfit = 40;
extern double TrailingStop = 20;
double var_100 = 0;
int var_108 = 10;
int var_112 = 1;
int var_116 = 3;
int var_120 = 0;
double var_124 = 10;
double var_132 = 10;
double var_140 = 10;
double var_148 = 9.715;
int var_156 = 2005;
int var_160 = 1;
int var_164 = 2050;
int var_168 = 12;
int var_172 = 22;
int var_176 = 30;
int var_180 = 0;
int var_184 = 12;
int var_188 = 0;
int var_192 = 0;
int cnt = 0;
int slippage = 5;
double stoploss = 0;
double takeprofit = 0;
double bprice = 0;
double sprice = 0;
double var_236 = 0;
double lots = 0;
int var_252 = 0;
int var_256 = 0;
bool var_260 = true;
double var_264 = 0;
int var_272 = 0;
double var_276 = 0;
int var_284 = 0;
int var_288 = 0;
double var_292 = 0;
double var_300 = 0;
double var_308 = 0;
double var_316 = 0;
string var_324 = "";
string var_332 = "";
double Lots;

//+------------------------------------------------------------------+

double Lots()
{
Lots = NormalizeDouble(AccountFreeMargin() / 5 / 10000,1);
if (Lots < 0.1) Lots = 0.1;
if (Lots > 100.0) Lots = 100;
return(Lots);
}

//+------------------------------------------------------------------+

int init()
{
if (IsTesting())
{
ObjectCreate("text_object",OBJ_LABEL,0,0,0);
ObjectSet("text_object",OBJPROP_XDISTANCE,4);
ObjectSet("text_object",OBJPROP_YDISTANCE,15);
ObjectSetText("text_object","(c) ExpertAdvisors, http://forex-soft.netfirms.com",8,"Verdana",Gold);
}
else
{
Alert("Demo-version runs under Strategy Tester,\nnot on account - ON HISTORY ONLY !\n\nSee full version at http://forex-soft.netfirms.com");
}
return(0);
}

//+------------------------------------------------------------------+

int deinit()
{
return(0);
}

//+------------------------------------------------------------------+

int start()
{
if (IsTesting())
{
if (var_188 == 1)
{
if (var_180 != 0)
var_236 = MathCeil(AccountBalance() * var_184 / 10000);
else
var_236 = Lots();
}
else
{
if (var_180 != 0)
var_236 = MathCeil(AccountBalance() * var_184 / 10000) / 10;
else
var_236 = Lots();
}
if (var_236 > 100.0) var_236 = 100;
var_192 = 0;
for (cnt = 0; cnt < OrdersTotal(); cnt++)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if ((OrderSymbol() == Symbol())) var_192++;
}
if (var_192 < 1)
{
if (TimeYear(CurTime()) < var_156) return(0);
if (TimeMonth(CurTime()) < var_160) return(0);
if (TimeYear(CurTime()) > var_164) return(0);
if (TimeMonth(CurTime()) > var_168) return(0);
}
if ((Symbol() == "EURUSD")) var_316 = var_124;
if ((Symbol() == "GBPUSD")) var_316 = var_132;
if ((Symbol() == "USDJPY")) var_316 = var_148;
if ((Symbol() == "USDCHF")) var_316 = var_140;
if (var_316 == 0.0) var_316 = 5;
if (var_272 > var_192)
{
for (cnt = OrdersTotal(); cnt >= 0; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
var_252 = OrderType();
if ((OrderSymbol() == Symbol()))
{
if (var_252 == 0) OrderClose(OrderTicket(),OrderLots(),OrderClosePri ce(),slippage,Blue);
if (var_252 == 1) OrderClose(OrderTicket(),OrderLots(),OrderClosePri ce(),slippage,Red);
return(0);
}
}
}
var_272 = var_192;
if (var_192 >= MaxTrades) var_260 = false; else var_260 = true;
if (var_264 == 0.0)
{
for (cnt = 0; cnt < OrdersTotal(); cnt++)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
var_252 = OrderType();
if ((OrderSymbol() == Symbol()))
{
var_264 = OrderOpenPrice();
if (var_252 == 0) var_256 = 2;
if (var_252 == 1) var_256 = 1;
}
}
}
if (var_192 < 1)
{
var_256 = 3;
if (iMACD(NULL,0,14,26,9,PRICE_CLOSE,MODE_MAIN,0) > iMACD(NULL,0,14,26,9,PRICE_CLOSE,MODE_MAIN,1)) var_256 = 2;
if (iMACD(NULL,0,14,26,9,PRICE_CLOSE,MODE_MAIN,0) < iMACD(NULL,0,14,26,9,PRICE_CLOSE,MODE_MAIN,1)) var_256 = 1;
if (var_120 == 1)
{
if (var_256 == 1)
{
var_256 = 2;
}
else
{
if (var_256 == 2)
{
var_256 = 1;
}
}
}
}
for (cnt = OrdersTotal(); cnt >= 0; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if ((OrderSymbol() == Symbol()))
{
if (OrderType() == OP_SELL)
{
if (TrailingStop > 0.0)
{
if (OrderOpenPrice() - Ask >= (TrailingStop + Pips) * Point)
{
if (OrderStopLoss() > Ask + Point * TrailingStop)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Ask + Point * TrailingStop,OrderClosePrice() - TakeProfit * Point - TrailingStop * Point,800,Purple);
return(0);
}
}
}
}
if (OrderType() == OP_BUY)
{
if (TrailingStop > 0.0)
{
if (Bid - OrderOpenPrice() >= (TrailingStop + Pips) * Point)
{
if (OrderStopLoss() < Bid - Point * TrailingStop)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid - Point * TrailingStop,OrderClosePrice() + TakeProfit * Point + TrailingStop * Point,800,Yellow);
return(0);
}
}
}
}
}
}
var_276 = 0;
var_284 = 0;
var_288 = 0;
var_292 = 0;
var_300 = 0;
for (cnt = 0; cnt < OrdersTotal(); cnt++)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if ((OrderSymbol() == Symbol()))
{
var_284 = OrderTicket();
if (OrderType() == OP_BUY) var_288 = 0;
if (OrderType() == OP_SELL) var_288 = 1;
var_292 = OrderClosePrice();
var_300 = OrderLots();
if (var_288 == 0)
{
if (OrderClosePrice() < OrderOpenPrice()) var_276 = var_276 - (OrderOpenPrice() - OrderClosePrice()) * OrderLots() / Point;
if (OrderClosePrice() > OrderOpenPrice()) var_276 = var_276 + (OrderClosePrice() - OrderOpenPrice()) * OrderLots() / Point;
}
if (var_288 == 1)
{
if (OrderClosePrice() > OrderOpenPrice()) var_276 = var_276 - (OrderClosePrice() - OrderOpenPrice()) * OrderLots() / Point;
if (OrderClosePrice() < OrderOpenPrice()) var_276 = var_276 + (OrderOpenPrice() - OrderClosePrice()) * OrderLots() / Point;
}
}
}
var_276 = var_276 * var_316;
var_332 = "Profit: $" + DoubleToStr(var_276,2) + " +/-";
if ((var_192 >= MaxTrades - var_116) && (var_112 == 1))
{
if (var_276 >= var_108)
{
OrderClose(var_284,var_300,var_292,slippage,Yellow );
var_260 = false;
return(0);
}
}
if (!IsTesting())
{
if (var_256 == 3)
var_324 = "No conditions to open trades";
else
var_324 = " ";
}
if ((var_256 == 1) && var_260)
{
if ((Bid - var_264 >= Pips * Point) || (var_192 < 1))
{
sprice = Bid;
var_264 = 0;
if (TakeProfit == 0.0) takeprofit = 0; else takeprofit = sprice - TakeProfit * Point;
if (var_100 == 0.0) stoploss = 0; else stoploss = sprice + var_100 * Point;
if (var_192 != 0)
{
lots = var_236;
cnt = 1;
while (cnt <= var_192)
{
if (MaxTrades > 12)
lots = NormalizeDouble(lots * 1.5,1);
else
lots = NormalizeDouble((lots + lots),1);
cnt++;
}
}
else
{
lots = var_236;
}
if (lots > 100.0) lots = 100;
OrderSend(Symbol(),OP_SELL,lots,sprice,slippage,st oploss,takeprofit,0,0,0,Red);
return(0);
}
}
if ((var_256 == 2) && var_260)
{
if ((var_264 - Ask >= Pips * Point) || (var_192 < 1))
{
bprice = Ask;
var_264 = 0;
if (TakeProfit == 0.0) takeprofit = 0; else takeprofit = bprice + TakeProfit * Point;
if (var_100 == 0.0) stoploss = 0; else stoploss = bprice - var_100 * Point;
if (var_192 != 0)
{
lots = var_236;
cnt = 1;
while (cnt <= var_192)
{
if (MaxTrades > 12)
lots = NormalizeDouble(lots * 1.5,1);
else
lots = NormalizeDouble((lots + lots),1);
cnt++;
}
}
else
{
lots = var_236;
}
if (lots > 100.0) lots = 100;
OrderSend(Symbol(),OP_BUY,lots,bprice,slippage,sto ploss,takeprofit,0,0,0,Blue);
return(0);
}
}
}
return(0);
}
Hello Traders,

I know that my request is a little difficult but perhaps a programmer of the forum will be able to help us.
Could one modify script to be able to have Lots initials:0.01 for trader with IBFX.
And Stoploss please.
By advance, thank you of your contribution
__________________
All long voyages always start from the first small steps ...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #125 (permalink)  
Old 03-02-2007, 02:14 PM
dmbsys's Avatar
Senior Member
 
Join Date: Jan 2007
Posts: 118
dmbsys is on a distinguished road
For lots = 0.01

Try this :

Code:
else
{
if (var_180 != 0)
var_236 = MathCeil(AccountBalance() * var_184 / 10000) / 100;
else
var_236 = Lots();
}
Replace /10 by /100

I'm not sure because I'm new on mq4 but I suppose that work.

Michel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #126 (permalink)  
Old 03-02-2007, 02:17 PM
dmbsys's Avatar
Senior Member
 
Join Date: Jan 2007
Posts: 118
dmbsys is on a distinguished road
For Stoploss :

Code:
double var_100 = 0;
Before, add
Code:
Extern Double InitialStop=100;
And here before
Code:
double Lots()
{
:

Code:
var_100 = InitialStop;
Michel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #127 (permalink)  
Old 03-02-2007, 05:06 PM
dmbsys's Avatar
Senior Member
 
Join Date: Jan 2007
Posts: 118
dmbsys is on a distinguished road
Hi BrunoFX :

Here's the code that you search :

Code:
#property copyright "Copyright © 2006, Expert Advisors"
#property link "http://forex-soft.netfirms.com"

extern int MaxTrades = 4;
extern int Pips = 5;
extern double TakeProfit = 40;
extern double TrailingStop = 20;
extern double InitialStop = 100;  // dmbsys
double var_100 = 0;
int var_108 = 10;
int var_112 = 1;
int var_116 = 3;
int var_120 = 0;
double var_124 = 10;
double var_132 = 10;
double var_140 = 10;
double var_148 = 9.715;
int var_156 = 2005;
int var_160 = 1;
int var_164 = 2050;
int var_168 = 12;
int var_172 = 22;
int var_176 = 30;
int var_180 = 0;     // Money Management : True = 1
int var_184 = 12;
int var_188 = 0;     // Normal Account = 1
int var_192 = 0;
int cnt = 0;
int slippage = 5;
double stoploss = 0;
double takeprofit = 0;
double bprice = 0;
double sprice = 0;
double var_236 = 0;
double lots = 0;
int var_252 = 0;
int var_256 = 0;
bool var_260 = true;
double var_264 = 0;
int var_272 = 0;
double var_276 = 0;
int var_284 = 0;
int var_288 = 0;
double var_292 = 0;
double var_300 = 0;
double var_308 = 0;
double var_316 = 0;
string var_324 = "";
string var_332 = "";
double Lots;

//+------------------------------------------------------------------+

double Lots()
{
Lots = NormalizeDouble(AccountFreeMargin() / 5 / 10000,2);
if (Lots < 0.01) Lots = 0.01;
if (Lots > 100.0) Lots = 100;
return(Lots);
}

//+------------------------------------------------------------------+

int init()
{
if (IsTesting())
{
ObjectCreate("text_object",OBJ_LABEL,0,0,0);
ObjectSet("text_object",OBJPROP_XDISTANCE,4);
ObjectSet("text_object",OBJPROP_YDISTANCE,15);
ObjectSetText("text_object","(c) ExpertAdvisors, http://forex-soft.netfirms.com",8,"Verdana",Gold);
}
else
{
Alert("Demo-version runs under Strategy Tester,\nnot on account - ON HISTORY ONLY !\n\nSee full version at http://forex-soft.netfirms.com");
}
return(0);
}

//+------------------------------------------------------------------+

int deinit()
{
return(0);
}

//+------------------------------------------------------------------+

int start()
{
var_100 = InitialStop;        // dmbsys
if (IsTesting())
{
if (var_188 == 1)
{
if (var_180 != 0)
var_236 = MathCeil(AccountBalance() * var_184 / 10000);
else
var_236 = Lots();
}
else
{
if (var_180 != 0)
var_236 = MathCeil(AccountBalance() * var_184 / 10000) / 100;
else
var_236 = Lots();
}
if (var_236 > 100.0) var_236 = 100;
var_192 = 0;
for (cnt = 0; cnt < OrdersTotal(); cnt++)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if ((OrderSymbol() == Symbol())) var_192++;
}
if (var_192 < 1)
{
if (TimeYear(CurTime()) < var_156) return(0);
if (TimeMonth(CurTime()) < var_160) return(0);
if (TimeYear(CurTime()) > var_164) return(0);
if (TimeMonth(CurTime()) > var_168) return(0);
}
if ((Symbol() == "EURUSD")) var_316 = var_124;
if ((Symbol() == "GBPUSD")) var_316 = var_132;
if ((Symbol() == "USDJPY")) var_316 = var_148;
if ((Symbol() == "USDCHF")) var_316 = var_140;
if (var_316 == 0.0) var_316 = 5;
if (var_272 > var_192)
{
for (cnt = OrdersTotal(); cnt >= 0; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
var_252 = OrderType();
if ((OrderSymbol() == Symbol()))
{
if (var_252 == 0) OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),slippage,Blue);
if (var_252 == 1) OrderClose(OrderTicket(),OrderLots(),OrderClosePrice(),slippage,Red);
return(0);
}
}
}
var_272 = var_192;
if (var_192 >= MaxTrades) var_260 = false; else var_260 = true;
if (var_264 == 0.0)
{
for (cnt = 0; cnt < OrdersTotal(); cnt++)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
var_252 = OrderType();
if ((OrderSymbol() == Symbol()))
{
var_264 = OrderOpenPrice();
if (var_252 == 0) var_256 = 2;
if (var_252 == 1) var_256 = 1;
}
}
}
if (var_192 < 1)
{
var_256 = 3;
if (iMACD(NULL,0,14,26,9,PRICE_CLOSE,MODE_MAIN,0) > iMACD(NULL,0,14,26,9,PRICE_CLOSE,MODE_MAIN,1)) var_256 = 2;
if (iMACD(NULL,0,14,26,9,PRICE_CLOSE,MODE_MAIN,0) < iMACD(NULL,0,14,26,9,PRICE_CLOSE,MODE_MAIN,1)) var_256 = 1;
if (var_120 == 1)
{
if (var_256 == 1)
{
var_256 = 2;
}
else
{
if (var_256 == 2)
{
var_256 = 1;
}
}
}
}
for (cnt = OrdersTotal(); cnt >= 0; cnt--)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if ((OrderSymbol() == Symbol()))
{
if (OrderType() == OP_SELL)
{
if (TrailingStop > 0.0)
{
if (OrderOpenPrice() - Ask >= (TrailingStop + Pips) * Point)
{
if (OrderStopLoss() > Ask + Point * TrailingStop)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Ask + Point * TrailingStop,OrderClosePrice() - TakeProfit * Point - TrailingStop * Point,800,Purple);
return(0);
}
}
}
}
if (OrderType() == OP_BUY)
{
if (TrailingStop > 0.0)
{
if (Bid - OrderOpenPrice() >= (TrailingStop + Pips) * Point)
{
if (OrderStopLoss() < Bid - Point * TrailingStop)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Bid - Point * TrailingStop,OrderClosePrice() + TakeProfit * Point + TrailingStop * Point,800,Yellow);
return(0);
}
}
}
}
}
}
var_276 = 0;
var_284 = 0;
var_288 = 0;
var_292 = 0;
var_300 = 0;
for (cnt = 0; cnt < OrdersTotal(); cnt++)
{
OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES);
if ((OrderSymbol() == Symbol()))
{
var_284 = OrderTicket();
if (OrderType() == OP_BUY) var_288 = 0;
if (OrderType() == OP_SELL) var_288 = 1;
var_292 = OrderClosePrice();
var_300 = OrderLots();
if (var_288 == 0)
{
if (OrderClosePrice() < OrderOpenPrice()) var_276 = var_276 - (OrderOpenPrice() - OrderClosePrice()) * OrderLots() / Point;
if (OrderClosePrice() > OrderOpenPrice()) var_276 = var_276 + (OrderClosePrice() - OrderOpenPrice()) * OrderLots() / Point;
}
if (var_288 == 1)
{
if (OrderClosePrice() > OrderOpenPrice()) var_276 = var_276 - (OrderClosePrice() - OrderOpenPrice()) * OrderLots() / Point;
if (OrderClosePrice() < OrderOpenPrice()) var_276 = var_276 + (OrderOpenPrice() - OrderClosePrice()) * OrderLots() / Point;
}
}
}
var_276 = var_276 * var_316;
var_332 = "Profit: $" + DoubleToStr(var_276,2) + " +/-";
if ((var_192 >= MaxTrades - var_116) && (var_112 == 1))
{
if (var_276 >= var_108)
{
OrderClose(var_284,var_300,var_292,slippage,Yellow );
var_260 = false;
return(0);
}
}
if (!IsTesting())
{
if (var_256 == 3)
var_324 = "No conditions to open trades";
else
var_324 = " ";
}
if ((var_256 == 1) && var_260)
{
if ((Bid - var_264 >= Pips * Point) || (var_192 < 1))
{
sprice = Bid;
var_264 = 0;
if (TakeProfit == 0.0) takeprofit = 0; else takeprofit = sprice - TakeProfit * Point;
if (var_100 == 0.0) stoploss = 0; else stoploss = sprice + var_100 * Point;
if (var_192 != 0)
{
lots = var_236;
cnt = 1;
while (cnt <= var_192)
{
if (MaxTrades > 12)
lots = NormalizeDouble(lots * 1.5,1);
else
lots = NormalizeDouble((lots + lots),1);
cnt++;
}
}
else
{
lots = var_236;
}
if (lots > 100.0) lots = 100;
OrderSend(Symbol(),OP_SELL,lots,sprice,slippage,stoploss,takeprofit,0,0,0,Red);
return(0);
}
}
if ((var_256 == 2) && var_260)
{
if ((var_264 - Ask >= Pips * Point) || (var_192 < 1))
{
bprice = Ask;
var_264 = 0;
if (TakeProfit == 0.0) takeprofit = 0; else takeprofit = bprice + TakeProfit * Point;
if (var_100 == 0.0) stoploss = 0; else stoploss = bprice - var_100 * Point;
if (var_192 != 0)
{
lots = var_236;
cnt = 1;
while (cnt <= var_192)
{
if (MaxTrades > 12)
lots = NormalizeDouble(lots * 1.5,1);
else
lots = NormalizeDouble((lots + lots),1);
cnt++;
}
}
else
{
lots = var_236;
}
if (lots > 100.0) lots = 100;
OrderSend(Symbol(),OP_BUY,lots,bprice,slippage,stoploss,takeprofit,0,0,0,Blue);
return(0);
}
}
}
return(0);
}
Michel

Last edited by dmbsys; 03-02-2007 at 05:31 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #128 (permalink)  
Old 03-02-2007, 05:33 PM
moneymaxs's Avatar
Member
 
Join Date: Sep 2006
Posts: 86
moneymaxs is on a distinguished road
can u please create M4
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #129 (permalink)  
Old 03-03-2007, 01:49 AM
Junior Member
 
Join Date: Feb 2007
Posts: 1
saab87 is on a distinguished road
Is there any ea that works

Is there any EA out there that works. I tried the cyberia yesterday on a live demo, euro/usd m15 with $4000 account and it went to
$4400 then down to $4000, then up to $5500 by this afternoon. I was impressed, but I will test it out next week.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #130 (permalink)  
Old 03-03-2007, 09:22 AM
BrunoFX's Avatar
Senior Member
 
Join Date: Sep 2005
Posts: 816
BrunoFX will become famous soon enough
Quote:
Originally Posted by dmbsys
Hi BrunoFX :

Here's the code that you search

Michel
Hello Michel,


Un grand merci et de la gratifications pour ta participation et ton aide

A large mercy and gratifications for your participation and your assistance

__________________
All long voyages always start from the first small steps ...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
EuroX2, eurox2.ex4, EuroX2_sl, EuroX2 Ea, *.ex4, ea ex4, eurx2, forex ex4, eurox2dmbsys, EA EuroX2


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
new eurox2 sl v 1.2 EA Alejandro Galindo che Expert Advisors - Metatrader 4 31 04-10-2007 01:54 PM
Data & Comments cja Setup Questions 5 08-19-2006 11:58 AM


All times are GMT. The time now is 03:47 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.