Topics
22 Nov 2018, 23:48
 1302
 6
24 Oct 2016, 18:08
 2154
 1
14 Oct 2014, 20:45
 2553
 3
Replies

9718853
15 Jan 2015, 18:03

RE: RE:

Thank you... I'll try and convert my cBot to jforex in time to enter the Feb comp... See you there!!!

breakermind said:

Ian_Drummond said:

Hi,

I have several cBots which are too aggressive to trade with real cash and am wondering if there are any current competitions for robot trading with demo accounts? 

I had a search online to find some old competitions from 2011 / 2012... 

It looks like a great way to raise some real trading capital and unleash those fun cBots that make hundreds of millions...

Thanking ya'll in advance...

Hi,

but not on cAlgo(monthly on jforex):

http://www.dukascopy.com/strategycontest/?action=allContestStandings

Bye.

 


@9718853

9718853
12 Jan 2015, 20:20

Hi,

I have several cBots which are too aggressive to trade with real cash and am wondering if there are any current competitions for robot trading with demo accounts? 

I had a search online to find some old competitions from 2011 / 2012... 

It looks like a great way to raise some real trading capital and unleash those fun cBots that make hundreds of millions...

Thanking ya'll in advance...


@9718853

9718853
02 Jan 2015, 16:00

var shortPositionsCount = Positions.Count(p => p.TradeType == TradeType.Sell);
            var longPositionsCount = Positions.Count(p => p.TradeType == TradeType.Buy);

Adding 'Symbol' would keep the search to a single currency pair...


@9718853

9718853
02 Jan 2015, 15:22

 

/forum/whats-new/1463

 


@9718853

9718853
02 Jan 2015, 15:18

What's your trade logic?


@9718853

9718853
02 Jan 2015, 15:17

Cant you just close all orders onBar?

 foreach (var order in PendingOrders)
            {
                Print("Canceling Order : " + PendingOrders.Count);
                CancelPendingOrder(order);
            }
        }

 


@9718853

9718853
02 Jan 2015, 15:13

Most of the robots and code on here have obsolete terms... I've always found that the warnings tell you how to fix them... 

Do you know how the robot trades or what you want it to do? 

Trading with code you don't understand is kind of like jumping in a formula 1 car and expecting to win the race, you're more likely to crash and burn very quickly...


@9718853

9718853
02 Jan 2015, 14:47

That would close all orders... We need to find a way to close orders independently so that an order can be cancelled when a position takes profit or upon some other trigger...


@9718853

9718853
02 Jan 2015, 14:39

This seems to work....

int posCount = Positions.Count;
            
            for (int y = posCount - 1; y >= 0; y--)
            {
                int totalPips = (int)(Positions[y].Pips - Positions[y].EntryPrice);
                
                int test = 0;
                if (!dic.TryGetValue(Positions[y].Id, out test))
                    dic[Positions[y].Id] = 0;


                if (totalPips == X && test == 0)
                {
                    Print("positions id: " + dic[Positions[y].Id] + " test: " + test + " idx: " + y);
                    dic[Positions[y].Id] = 1;
                    if (Positions[y].TradeType == TradeType.Sell)
                    {
                        Print("LONG HEDGE" + Positions[y].Pips);

                        ExecuteMarketOrder(TradeType.Buy, Symbol, Volume, label, StopLossInPips, TakeProfitInPips);

                    }
                    else
                    {
                        Print("SHORT HEDGE" + Positions[y].Pips);
                        ExecuteMarketOrder(TradeType.Sell, Symbol, Volume, label, StopLossInPips, TakeProfitInPips);

                    }
                }
            }
        }

 


@9718853

9718853
21 Dec 2014, 23:02

Well I'm stumped! Can anyone offer any suggestions?

Thank you in advance...


@9718853

9718853
19 Dec 2014, 17:11

So, is it possible to code something like this logic?

if (Positions[y].Id //has crossed level X once//)

{

//Do Something//;

}

 


@9718853

9718853
19 Dec 2014, 14:01

Thank you for answering... I've made some progress with the code below, and it seems to be working well, however once the conditions are met the event (open position to hedge) is executing onBar...

How can we ensure this only happens once per Positions[y] ?

 

int posCount = Positions.Count;
            // Total positions.
            for (int y = posCount - 1; y >= 0; y--)
            {
                // Total pips for a trade.
                int totalPips = (int)(Positions[y].EntryPrice - Positions[y].Pips);

                if (totalPips == X)
                {
                    Print("SafetyNet Hit");
                    if (Positions[y].TradeType == TradeType.Sell)
                    {
                        Print("LONG HEDGE" + Positions[y].Pips);

                        ExecuteMarketOrder(TradeType.Buy, Symbol, Volume, label, StopLossInPips, TakeProfitInPips * 2);

                    }
                    else
                    {
                        Print("SHORT HEDGE" + Positions[y].Pips);
                        ExecuteMarketOrder(TradeType.Sell, Symbol, Volume, label, StopLossInPips, TakeProfitInPips * 2);

 


@9718853

9718853
19 Dec 2014, 00:40

Hi all,

I'd like to place events on individual trades in my robot, the code below allows an event to be taken after each individual robot has been open for a certain time X...

I'm trying to convert this so that I can place an event after X pips or X gross profit, etc..... It's proving a real head scratcher, can anyone help? Any input would be greatly appreciated...

 

  DateTime currTime = Time;
            // The current time.
            int posCount = Positions.Count;
            // Total positions.
            for (int i = posCount - 1; i >= 0; i--)
            {
                // Total time elapsed for a trade.
                int elapsedMinutes = (int)(currTime.Subtract(Positions[i].EntryTime).TotalMinutes);
               
                if (elapsedMinutes == X )
                {


@9718853

9718853
17 Dec 2014, 22:17

Update?

Is there an answer to this question?

Is it possible to use the trade ID to assign a pendingOrder to the position that triggers it?

This would allow the existence of the origional trade to define whether the pending order should exist too...

I'm wanting to use this method to hedge against large equity drawdowns...

Many thanks in advance....


@9718853

9718853
03 Dec 2014, 15:28

RE: RE: RE:

Still working on it I'm afraid... Will post any solutions here...

tradermatrix said:

did you find a solution ....?
 I have modified the code but the problem remains.
 best regards

Can I assume that this stock response means that the problem is with the code / logic at our end?

I understand that SpotWare can't spend their time fixing everyones code but it would be good to be reassured that there are no bugs in multi time frame backtesting / optimisation that cause this issue...

 

 

 

 

 


@9718853

9718853
24 Nov 2014, 12:06

RE:

Can I assume that this stock response means that the problem is with the code / logic at our end?

I understand that SpotWare can't spend their time fixing everyones code but it would be good to be reassured that there are no bugs in multi time frame backtesting / optimisation that cause this issue...

 

 

Spotware said:

Dear Traders,

Spotware team doesn't provide the engage service. We can recommend you to contact one of our Partners or post a job in Development Jobs section.

 


@9718853

9718853
24 Nov 2014, 12:06

RE:

Can I assume that this stock response means that the problem is with the code / logic at our end?

I understand that SpotWare can't spend their time fixing everyones code but it would be good to be reassured that there are no bugs in multi time frame backtesting / optimisation that cause this issue...

 

 

Spotware said:

Dear Traders,

Spotware team doesn't provide the engage service. We can recommend you to contact one of our Partners or post a job in Development Jobs section.

 


@9718853

9718853
23 Nov 2014, 22:36

Well I'm completely stumped! 

Can anyone from SpotWare offer any insight?


@9718853

9718853
22 Nov 2014, 23:36

RE: RE: RE: RE: RE: RE:

Thank you for pointing these out Tradermatrix...

 

 

 

 

I was aware that these parameters were dormant but didn't think it could do any harm...

I've now cleaned up these pointless snippets and I'm no further forward with the origional problem...

I have played around with all moving average code, I deleted everything relating to the daily MA and replaced it with a 12hour version but the issue remained...

After checking over every factor I can think of and cleaning up the pointless code you mentioned, a 6 month backtest places 368 trades and the exact same settings & parameters don't place single trade through optimisation...

Could it be that Multi Time Frame cBots aren't supported in cAlgo backtesting and optimisation?!?!!?!?

 

tradermatrix said:

ok, I have noticed that;  [Parameter("SI Limit Move", DefaultValue = 12)]
        public int LimitMove { get; set; }.

 DefaultValue = 12 or 120....no difference (error?)

also ;

 [Parameter("Ten MA Periods", DefaultValue = 150)]
        public int TenMAPeriods { get; set; }  ......... not active

to be activated;

add on

  if (Positions.Count < LimitPositions && Symbol.Ask > top && rsi.Result.LastValue < highRSI && triL > TrueRangeLimit && siCurrent > siLast && FortyFiveMa > DailyMa && TenMa >DailyMa)

  else if (Positions.Count < LimitPositions && Symbol.Bid < bottom && rsi.Result.LastValue > lowRSI && triL > TrueRangeLimit && siCurrent < siLast && FortyFiveMa < DailyMa &&  TenMa

on all relevant lines...

 

 

 

 

 

 

 

 

 


@9718853

9718853
22 Nov 2014, 21:07

RE: RE: RE: RE:

Ok, the daily does seem to be the bad egg... But I can't seem to fix it, I've tried changing some letters to and from capitals and the default values as suggested.. the Backtesting and Optimisation results change slightly but still don't match up...

I'll keep working on it and post back here with results...

tradermatrix said:

watching parameter by parameter
 the problem is daily
 by changing the code or by regulating   [Parameter ("Daily MA Periods" DefaultValue = 1)]
 everything returns to normal
 can you look?
 

 

 

 

 

 


@9718853