klod
-
Posts
104 -
Joined
-
Last visited
-
Days Won
4
Content Type
Profiles
Forums
Articles
Posts posted by klod
-
-
if (!(AccountFreeMargin() >= (AccountBalance()/10) ))
{// very low free margin
order executing code here
} else { // good margin}
AccountBalance() and AccountFreeMargin() are functions
-
to make a comment in the left hand side of a chart, you should only use Comment(" some text"); and it's not useful to draw by ObjectSet functions.
I use this code in my Info() function
bool Info() {RefreshRates(); int heure;
if(Hour()!=heure){ heure=Hour(); save();}
equitmax=MathMax(equitmax,AccountEquity());
equitmin=MathMin(equitmin, AccountEquity());
if(Hour()==23) zer=true;
if(Hour()==0 && zer) {equitminuit=AccountEquity(); zer=false; Print("Equity at noon=",equitminuit," hour=",TimeToStr(TimeCurrent())); save();}
if(IsTesting() && !IsVisualMode()) return(true);
spread=Ask-Bid;
smax=MathMax(smax,spread);
smin=MathMin(smin,spread);
Comment(
"\n "
+ "------------------------------------------------"
+ "\n "
+ "Broker : " + AccountCompany()
+ "\n "
+ "------------------------------------------------"
+ "\n "
+ "Spread : "+ DoubleToStr(spread*tniop,2)+" Spread max : "+ DoubleToStr(smax*tniop,2) +" Spread min : "+ DoubleToStr(smin*tniop,2)
+ "\n "
+ "Gain of the day: "+ DoubleToStr(AccountEquity()-equitminuit,2)+" "+ AccountCurrency()+" Objectif = "+DoubleToStr(objectif,2)+ AccountCurrency()
+ "\n "
+ "Equity : " + DoubleToStr(AccountEquity(), 2)+" "+ AccountCurrency()
+ "\n "
+ "Equity Max : " + DoubleToStr(equitmax, 2)+" "+ AccountCurrency() +" "
+ "Equity Min : "+ DoubleToStr(equitmin, 2)+" "+ AccountCurrency()
+ "\n "
+ "------------------------------------------------"
+"\n "
+ "Lots : "+DoubleToStr(lot,2)
+ "\n "
+ "Server time : " + TimeToStr(TimeCurrent(), TIME_SECONDS)
+ "\n "
+ "------------------------------------------------");
return(true);
}
-
The strategie in the first post is not profitable. It's an evidence:
1.3000 BUY(1.3000)+SELL(1.3000) opened (exactly at the same open price )
1.3010 BUY closed (+10 pips) but SELL =-10 pips total = - 2 spreads -> BUY(1.3010) opens + SELL(1.3010) opens total= - 2 spreads before opening the BUY+SELL at 1.3010
1.3020 BUY(1.3010) closed (+10 pips) and SELL (1.3000)= -20 pips and SELL(1.3010)=-10 pips total = +20 pips -30 pips - 4 spread before opening BUY+ SELL at 1.3020 ! total =-10 pips -4 spreads
if the ask is downward from 1.3010:
1.3000 SELL (1.3000)=0 pip + BUY(1.3010) =-10 pips + SELL(1.3010)= +10 pips before opening the BUY+SELL at 1.3000 total=10 pips (from the BUY(1.3000 closed at 1.3010)-4 spreads
the average gain is so = 0 pips - 4 spread !!!
-
If OrderCloseBy is not allowed on the server, GetLastError() returns 3.
so a possible code is:
bool supporte_closeby;
int init()
{
supporte_closeby=true;
...
return(0);
}
int essai_maximum=4;
int start()
{ ...
int essai=0,err;
kb=... // ticket BUY to close
ks=... // ticket SELL to close
lb=... // OrderLot() BUY
ls=... // OrderLot() SELL
// Info() is the information box routine. It returns always true;
if(supporte_closeby)
{ while(Info()!=OrderCloseBy(kb,ks, Green) && essai<=essais_maximum) {err=GetLastError(); if(err==4108) break;
if(err==3) {supporte_closeby=false; break;} else {Sleep(10); essai++;}}
}
else
{ while (Info()!= OrderClose(ks, ls, NormalizeDouble(Ask,Digits), slippage, Green) && essai<=essais_maximum) {if(GetLastError()==4108) break; else {Sleep(10); essai++;}}
while (Info()!= OrderClose(kb, lb, NormalizeDouble(Bid,Digits), slippage, Green) && essai<=essais_maximum) {if(GetLastError()==4108) break; else {Sleep(10); essai++;}}
}
...
return(0);
}
-
How to determine in an expert advisor if the closeby function is supported by the broker ?
I have made a routine to close all the trades and the closeby function is called when SELLs and BUYs orders are opened.
But the closeby function is broker dependant: FXCM doesn't support closeby but Activtrades, Yes...
The method to determine if closeby is supported is to see the "new order" dialog box in the terminal
I search an automatic method.
Thanks you.
-
(cancelled)
thanks
-
Just out of curiosity, why do you keep posting on here when you don't want to share the so-called system and you refuse to answer questions posted?
where are the questions ?
I don't want to share the so-called system because it's a loser system. But on the ruin of this system i have made this one which is on a vps (but only in demo, hélas) from today (6h21 GMT)
http://www.myfxbook.com/members/claudeh5/alibaba-101a/347257
-
-
You can use also ikoula (http://express.ikoula.co.uk/vm) for only 1€/month (512 Mo RAM is sufficient for one metatrader 4 and windows server 2008 standart)
I have an ea on ikoula.
-
the new version: https://www.asuswebstorage.com/navigate/share/GY4N5U7GGL
this version hedge only one time (but the hedge is closed in loss of stoplevel pips.)
-
-
I don't know what do you want exactly. I send you a little ea as tools for protection of accounts:
1/ it close the orders if equity > coeff % of balance
2/ it send Stoploss et Takeprofit or modify them for order of magicnumber magic1 and magic2
3/ it hedge if equity < HDG % of beginning equity
-
I plane to make a send mail function
-
-
When i have the source code.
-
Klod. Why don't you just be keepin' it to yerself, make some pips, be happy and keep yer mouth shut instead of irritatin' the pip hungry people on this forum now?
You are right. I beg your pardon for this thread.
-
It's also the reason of the forward test: in backtesting, when there is not tick data, the ticks are computed by a "generic algorithm". So ,for great candles, we are far of the truth.
-
There are other gaps in the archives.
it could be a flaw in MT4 ... wouldn't be the first...perhaps. And I have not Photoshop.
-
http://i1269.photobucket.com/albums/jj582/claudeh5/5jan2011.gif
-
told you it was doctored...
WHY ?
what it is not "doctored" is that: http://www.myfxbook.com/members/claudeh5/alibaba-92/314153
-
====
told you it was doctored...
can anyone confirm the drop reported by freddy on an actual chart on that day?
my charts (alpari uk) are telling me that it took from 3am until about midday for it to fall that distance...
i use the metaquotes data. You can download the same data in mt4 terminal : Archives or F2 EURUSD M1 and M5
-
pipsrider ? je ne connais pas.
-
no wonder its not working live...
http://www.myfxbook.com/portfolio/alibaba-92/314153
claudeh5 | Mail | Widgets | Settings | Sign out
Sponsored by
Home
Portfolio
Strategies
Systems
Community
Reviews
Contests
Tue, Jun 5, 08:21:50 GMT
Share
You Are Here : Home / Portfolio / alibaba 9.2
Discuss (0) Custom Analysis
alibaba 9.2
Demo (EUR), ActivTrades
Track Record Verified
Trading Privileges Not Verified
HTML CSV PDF
Info
Stats
General
Gain: +66.44%
Abs. Gain: +66.44%
Daily: 7.55%
Monthly: 703.20%
Drawdown: 12.27%
Balance: €8321.77
Equity: (100.00%) €8321.77
Highest: (Jun 05) €8321.77
Profit: €3321.77
Interest:€0.00
Deposits: €5000.00
Withdrawals:€0.00
Updated:1 minute ago
Tracking:0
More
Chart
Growth
Balance
Profit
Drawdown
Trading
Periods
Goals
Browser New
Gain (Difference) Profit (Difference) Pips (Difference) Win % (Difference) Trades (Difference) Lots (Difference)
Today +25.86% (-6.27%) €1709.75 (+€102.05) 22.00 (-15.0) 100% (+50%) 3 (+1) 32.30 (+24.91)
This Week +66.29% (+66.21%) €3317.45 (+€3313.13) 59.00 (+18.0) 80% (+45%) 5 (-12) 39.69 (+23.69)
This Month +68.41% (+69.58%) €3380.28 (+€3438.79) 117.00 (+134.0) 57% (+32%) 14 (+6) 53.62 (+51.55)
This Year +66.44% ( - ) €3321.77 ( - ) 100.00 ( - ) 45% ( - ) 22 ( - ) 55.69 ( - )
Advanced Statistics
Trades
Summary
Hourly
Daily
Risk Of Ruin
Duration
Trades: 22
Profitability:
Pips: 100.0
Average Win: 17.80 pips / €415.82
Average Loss: -6.50 pips / -€69.70
Lots: 55.69
Commissions: €0.00
Longs Won: (6/9) 66%
Shorts Won: (4/13) 30%
Best Trade(€): (Jun 04) 1963.43
Worst Trade(€): (Jun 04) -355.73
Best Trade (Pips): (Jun 01) 72.0
Worst Trade (Pips): (Jun 04) -16.0
Avg. Trade Length: 30m
Profit Factor: 4.97
Standard Deviation: €489.83
Sharpe Ratio: 0.28
Z-Score (Probability): -0.62 (46.47%)
Expectancy: 4.5 Pips / €150.99
AHPR: 2.73%
GHPR: 2.34%
-
how to determine, in an expert advisor, if the closeby function is supported
in MQL Programming
Posted