Topics
07 Jul 2016, 10:34
 0
 2269
 1
30 Sep 2014, 20:58
 3063
 1
23 Jan 2014, 21:43
 3692
 4
15 Jan 2014, 12:39
 4955
 3
09 Jan 2014, 15:15
 2758
 3
09 Jan 2014, 10:45
 0
 2597
 2
05 Jan 2014, 12:17
 3530
 6
04 Jan 2014, 19:43
 5693
 11
27 Dec 2013, 22:20
 4613
 10
27 Dec 2013, 16:51
 2648
 4
22 Dec 2013, 22:13
 3314
 5
19 Dec 2013, 09:50
 0
 3000
 2
19 Dec 2013, 09:16
 3105
 2
17 Dec 2013, 13:26
 0
 2576
 2
15 Dec 2013, 23:21
 3110
 2
13 Dec 2013, 13:23
 2883
 1
12 Dec 2013, 13:47
 2429
 2
10 Dec 2013, 19:53
 4504
 12
09 Dec 2013, 21:06
 2419
 3
Replies

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

jeex
12 Nov 2013, 22:55

Impossible in backtesting

Found the answer: impossible in backtesting. So i just have to trust that it works.

/forum/cbot-support/585


@jeex

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:33

Robot

By the way: does it matter that i'm making a robot that has to draw lines, and not an indicator?


@jeex

jeex
12 Nov 2013, 22:24 ( Updated at: 21 Dec 2023, 09:20 )

nevertheless

Tested the robot. Glas i did it in a demo account...


@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
07 Nov 2013, 15:25

Tested?

No problem at all, but a lot of work.

But have you tested this EA? in MT4 it shows about 135 errors. It needs an indicator and some more. It seems like you only got half of it here.

This XMT-scalper is supposed to be quite an awesome scalper with good results.


@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, 23:28

Beautiful

Looks promissing enough to me. Especialy the high % of wins. Can you share something about the indicators you used? 


@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
30 Oct 2013, 08:56

Vegie

From this turtle soup nobody gets fat.


@jeex

jeex
30 Oct 2013, 08:54

Stop robot

Following this matter: is it possible to stop a robot by code at a certain point?


@jeex

jeex
29 Oct 2013, 10:52

Alternative OK

The last alternative suits me well. Thanks


@jeex