![jeex's avatar](/uploads/user-2003/avatar/15e16c971b066dfdb0633954783e8f40d1cd166a.png)
Topics
Replies
jeex
12 Nov 2013, 22:49
martingale
The second best way for using martingale is not simply by doubling the lots, but by calculating the needed lots in relation to the TakeProfit of the next trade. You should also build in a stop when the StopLoss of the next trade would eventually cost too much.
The best way for using martingale is not to use it. It's very tempting, but very risky as well.
@jeex
jeex
12 Nov 2013, 22:44
RE: RE: tested and not happy
Hyperloop said:
jeex said:
Tested the EA in a live account and was not happy. The beautiful straight line up in backtesting is almost the same in a live account, except now its going straight down. Too much slippage and volatility within a bar, that is not considered during backtesting. This EA needs optimal conditions to make money.
That's unfortunate. Would it be viable perhaps running it on a higher timeframe?
Timeframe is not an isue in this EA. It works on the Tick. Only the indicators used are fixed on timeframes. Placing your computer in the same datahotel as ECN-servers might help. That's the problem with scalping EA's and robots: they may work great in backtesting, but often fail live. Try desiging a robot on the 1H or 4H or 1D timeframe. Less risk, more pips.
@jeex
jeex
12 Nov 2013, 22:19
tested and not happy
Tested the EA in a live account and was not happy. The beautiful straight line up in backtesting is almost the same in a live account, except now its going straight down. Too much slippage and volatility within a bar, that is not considered during backtesting. This EA needs optimal conditions to make money.
@jeex
jeex
05 Nov 2013, 18:16
two variables
Keep track of the current volume:
private int curVol; private int maxVol = 100; protected override void OnStart() { curVol = maxVol; } protected override void OnPositionOpened(Position p) { curVol = curVol - 10; } protected override void OnPositionClosed(Position p) { if (curVol <= 10) curVol = maxVol; }
@jeex
jeex
04 Nov 2013, 12:24
Casino
You guys are way to serious about all this. The thought is:
Win Chance == Lose Chance, IF trend is flat AND stopLoss == takeProfit (forget the spread for a moment) AND trade is placed At Random (Long or Short)
If trend is down or up, the angle of the trend can be put in the random generator and WinChance == LoseChance still counts.
Thus we place Random Trades and the Balance Line should be flat on the long run.
Random random = new Random(DateTime.UtcNow.Millisecond); int randomNumber = random.Next((int)((-100000) * Ema.Result[dezeBar - 2]), (int)(100000 * Ema.Result[dezeBar - 1])); if (randomNumber >= 0) { // stupid trade LONG? if (mac4.MACD.IsFalling() || mac1.MACD.IsFalling() || mac.MACD.IsRising() || Ema.Result.IsFalling()) return; GoLong(volume, SL, TP); } else { // stupid trade SHORT? if (mac4.MACD.IsRising() || mac1.MACD.IsRising() || mac.MACD.IsRising() || ema.Result.IsRising()) return; GoShort(volume, SL, TP); }
But: if you ignore the Random Trades that really are stupid according to the Indicators Dogma's I asked for, then Balance Line should go up. In fact this is a way of testing these dogma's.
Pure fun, but also educational and a good tester for these sort of Indicater based trading rules.
@jeex
jeex
03 Nov 2013, 23:17
jehjeh
As i said: a somewhat stupid idea, based on indicators. I know the gospel of risk management. Just want some global dogma's based on indicators. This "test" is just for fun. And fun it will be for all robot builders here who seek for the holy grail.
So: global dogma's on when not to trade based on Indicators or measurable candle data: bring it on.
@jeex
jeex
03 Nov 2013, 16:55
Interesting plan
Interesting approach of prize trading. But why make the code so complex, if the strategyis so simple? I have a few questions:
What is the exit strategy?
What are TakeProfit and StopLoss based upon?
Do you have a fail safe strategy? ie. MacD or SMA?
With the simple piece of code for only the m15 bar, results are sort of promising.
int dezeBar = MarketSeries.Open.Count - 1; int m30bar = m30.Open.Count - 1; int shift = 0; // breedte vorige bar; double dif = (MarketSeries.Close[dezeBar - 1] - MarketSeries.Open[dezeBar - 1]); double dif1 = Math.Abs(m30.Close[m30bar - 2] - m30.Open[m30bar - 2]); double dif2 = Math.Abs(m30.Close[m30bar - 3] - m30.Open[m30bar - 3]); double dif3 = Math.Abs(m30.Close[m30bar - 4] - m30.Open[m30bar - 4]); double dif4 = Math.Abs(m30.Close[m30bar - 5] - m30.Open[m30bar - 5]); MarketOrderRequest ma; if (dif >= 0) { // onderzoek long if (dif > dif1 && dif > dif2 && dif > dif3 && dif > dif4 && sma20.Result.IsRising()) { Print("open een trade LONG op " + mooieTijd(MarketSeries.OpenTime.LastValue)); ma = new MarketOrderRequest(TradeType.Buy, 1000); ma.Label = _LABEL; ma.StopLossPips = SL; ma.TakeProfitPips = TP; ma.SlippagePips = 1; Trade.Send(ma); } } else { // onderzoek short dif = dif * (-1); if (dif > dif1 && dif > dif2 && dif > dif3 && dif > dif4 && sma20.Result.IsFalling()) { Print("open een trade LONG op " + mooieTijd(MarketSeries.OpenTime.LastValue)); ma = new MarketOrderRequest(TradeType.Sell, 1000); ma.Label = _LABEL; ma.StopLossPips = SL; ma.TakeProfitPips = TP; ma.SlippagePips = 1; Trade.Send(ma); } }
@jeex
jeex
01 Nov 2013, 22:05
Oh darn. Math help
My mistake. Ik keep messing with the math. Like in the next caclulation:
I want to calculate how many pips i need for gaining 1 base currency with the minimum lot size (and not accounting the spread and commission).
- GBP JPY
- to make 1 baseCur (GBP)
- rate = 158.70 (JPY per GBP)
- lotSize= 1000
- pipSize = 0.01
- TP (takeProfit) = 40 pip
I need a calculation that gives me the trade.volume (lotSize) needed to gain 1 baseCur in a win at takeProfit. So, what volume should i trade to gain the needed GBP?
@jeex
jeex
30 Oct 2013, 23:12
Win 8?
I have the same setting here in Win8. Two screens, six instances of cAlgo. After a reboot i restart all the instances and everything is as it was. Only need to restart the robots manualy and asign the templates to the charts manualy.
If you want to automate things in Windows "on top of the running programs", try AutoHotKey. A briliant and free way to automate Windows.
@jeex
jeex
30 Oct 2013, 17:01
Nice robot
Modelling of a succesful trader was an educational journey. Job's done. Testing back and live went well. Customer is happy as his trading takes less time and less efforts and less risk.
In the meantime i learned a lot about trading Forex. So started building my own robot, partially based on this Turtle business. And it does pretty well on the Euro-USD pair in a H1 setting. Still working on it for other pairs and even M15.
@jeex
jeex
30 Oct 2013, 15:34
Oh beautiful N
Stacking as in setting more trades if things go well on 1/2N distance. yes. I also turned the strategy 180 degrees around, but with the same "volatile" results.
Maybe virtuesoft can share the core of his strategy, as there seem to be more Turtle Strategies around.
@jeex
jeex
13 Nov 2013, 09:15
Collab
I do believe in the quality of this EA's method. But rebuilding 26 A4-pages of code (made a print to study it) is a lot of work.
Maybe we can do this together. The program has a lot of useless functions and jibberjabber (with my sincere apologies to the maker, who has done a great job) for testing purposes etc. Stripping all that would halftime the job and make the program lean and mean.
Who's with me?
And then for using this one efectively we need a broker with very low spread on the EURUSD, EURGBP and GBPUSD (and maybe gold). MahiFX has a fixed rate on the EURUSD of 0.8. but only works with MT4. CommexFX (my broker) has a very low variable spread starting at 0.4 on the EURUSD. Any better suggestions?
Best regards
@jeex