Topics
28 Jan 2014, 17:41
 3298
 1
19 Jan 2014, 17:03
 3115
 4
12 Dec 2013, 14:48
 2101
 1
10 Sep 2013, 17:45
 5332
 6
Replies

Cerunnos
21 Oct 2013, 11:41

RE: RE:

breakermind said:

Cerunnos said:

I agree with you! You're just too good for this forum. Leave this hopeless area. You should instead go to the casino ;-) Good luck!

Yes of course.

But first let Admin delete my posts and indicators.

Thanks and bye and good luck.

I hope he does not delete it - your postings are simply delicious and should definitely be archived :-) Bye!


@Cerunnos

Cerunnos
21 Oct 2013, 11:32

I agree with you! You're just too good for this forum. Leave this hopeless area. You should instead go to the casino ;-) Good luck!


@Cerunnos

Cerunnos
21 Oct 2013, 10:30

RE: RE:

breakermind said:

Kate said:

You can modify your robot so that logic stays the same, but it's possible to backtest it on whole period. Just initialize everything you need on every Monday, not on robot start. And then we will see the real picture.

Hi,
yes you are right.

This forum is hopeless and I know that.

Please admin delete my profile posts and indicator from this forum !!!

Hi Breakermind,

this forum is not hopeless. You should just not post half-finished robots. Then there are no misunderstandings ... Stay tuned, you're on the right track!


@Cerunnos

Cerunnos
20 Oct 2013, 22:39

RE: RE:

breakermind said:

Hi it maybe ... but

$ 50 000 for the last two months with weeks with loss (-$1000)

how can you lose more than you have in your account?

ok it does not matter :)

whether I asked just this week that the test also distinguished colleagues have the same results as me?

Thanks adn bye.

Right, with the real account such losses are not possible -  your account balance is after three days only at zero :-)
It's not about the maximum profit in the shortest possible time with high risk. It's about steady profits over a longer period of time with minimal risk :-)


@Cerunnos

Cerunnos
20 Oct 2013, 20:55

Perhaps some improvements are still needed :-)

Starting capital: 1000,-
Loss in 4 weeks: -38758,-
Maximum loss: -65000,-
Max drawdown: 6018%


@Cerunnos

Cerunnos
20 Oct 2013, 00:45

RE:

MRSV said:

Hi

How do i make a position close after a set amount of hours?

Thanks

Hi, you could use a timer. Have not tested it but it should work.

using System.Timers;
...
private Position pos;
private readonly Timer _timer = new Timer();

 protected override void OnPositionOpened(Position openedPosition)
        {
        pos = openedPosition;        
        _timer.Elapsed += OnTimedEvent;
        _timer.Interval = 3  * 3600 * 1000; // Timer will tick every Interval (milliseconds)-> in 3 hours close position  
        _timer.Enabled = true; 
        _timer.Start(); 
        } 

 private void OnTimedEvent(object sender, ElapsedEventArgs e)        
        {  
       Trade.Close(pos);  
       _timer.Stop();       
        } 
protected override void OnPositionClosed(Position position)
        {
        pos = null;            
        }


@Cerunnos

Cerunnos
18 Oct 2013, 13:46 ( Updated at: 21 Dec 2023, 09:20 )

The same robot as above but without automatic volume adjustment. The graph looks better. More profit, but also a significantly higher drawdown value ( = more risk)...


 


@Cerunnos

Cerunnos
18 Oct 2013, 11:35 ( Updated at: 21 Dec 2023, 09:20 )

 

 

Hi. I've seen there impressive graphs. For me, especially a low max drawdown value is beside the profit important. With my current robot I have a value of approximately 16% (6 months). With a special parallel system of demo and live robot I can still significantly reduce this value and so avoid prolonged loss phases. I currently trade exclusively with gold and would be very interested in an exchange of knowledge with other traders: cerunnos32@gmx.at
regards

 


@Cerunnos

Cerunnos
17 Oct 2013, 19:48

RE:

Futuresmo said:

Hi

Am i missing something, or there is no way to set stops with this method?

 

Any other suggestions?

 

Thanks

 

With ModifyPosition() you can set SL & TP:

Trade.ModifyPosition(openedPosition, stopLoss, takeProfit);

In my view the better alternative is MarketOrderRequest() :

TradeType sell = TradeType.Sell;
var request = new MarketOrderRequest(sell, 10000)
           {
               Label = "Robot 1",
               SlippagePips = 0,
               StopLossPips = 10,
               TakeProfitPips = 20
           };
Trade.Send(request);


 


@Cerunnos

Cerunnos
17 Oct 2013, 10:15

RE:

MrTrader said:

Hello,

 

I am currently developing a new robot,

Can anyone help make a code for: 'Don't open position if spread is over 1 pip'

 

That would be great.

 

If(Symbol.Spread <= xy)
{  var request = new MarketOrderRequest(TradeType.Buy, vol) ... }  

or

double _Spread = Symbol.Ask - Symbol.Bid
If(_Spread <= xy)...

 


@Cerunnos

Cerunnos
16 Oct 2013, 09:38

RE:

MRSV said:

I have made a profitabel robot, but it only runs one cycle.

Right now i have my logich on OnStart(), but if i but it on on tick it makes over a 1000 positionsn

So if someone have a code for: When the position closes go back to start. (Repit)

Or a order limiter. ( Max Orders)

Thanks!

With the following simple solution you can limit maximum order number to one...

private bool IsOpenPosfalse;
...

protected override void OnTick()
{
if (!IsOpenPos)
            {
               if (_TDI.PriceSeries[Index] > _TDI.Middle[Index] && _TDI.PriceSeries[Index] > _TDI.SignalSeries[Index]) ...         
                       var request = new MarketOrderRequest(TradeType.Buy, vol)  
                        {                        
                        Label = "m10_Robot",
                        SlippagePips = 50,
                        StopLossPips = init_StopLoss                     
                        };  
                        Trade.Send(request);                        
                        IsOpenPostrue;                        
               }
}

 protected override void OnPositionClosed(Position closedPosition)
     {
      IsOpenPos = false;
     }


 

 


@Cerunnos

Cerunnos
10 Oct 2013, 14:58

RE:

supafly said:

Is there a simple way to create a notification email when a take profit or stop loss has been hit?

Thanks

Maybe something like that:

protected override void OnPositionClosed(Position closedPosition)
        {  
            if (closedPosition.TradeType == TradeType.Buy && closedPosition.Pips >= TakeProfit)                       
               Notifications.SendEmail("xy@domain.com", "xy@domain.com", "TP hit", "TP hit - buy order closed"); 
            else if ...
         }


            


@Cerunnos

Cerunnos
21 Sep 2013, 11:40

Based on the article /forum/cbot-support/357#4, a simple solution that checks every hour if your robot on the VPS is running properly. Do you get no e-mail, then the robot should be stopped...

 

        private readonly Timer _timer = new Timer(); 
        
        protected override void OnStart()
        {              
             _timer.Elapsed += OnTimedEvent; 
             _timer.Interval = 1  * 3600 * 1000; // Timer will tick every Interval (milliseconds) -> every hour send email
             _timer.Enabled = true
             _timer.Start(); 
        }
        
         private void OnTimedEvent(object sender, ElapsedEventArgs e)        
        { 
        string time_ = "Timer - Robot XY is running - UTC: " + Server.Time;
        Notifications.SendEmail(your_email@domain.com,"your_email@domain.com","Timer - Robot XY is running!",time_);
        }

 


@Cerunnos

Cerunnos
20 Sep 2013, 14:50 ( Updated at: 21 Dec 2023, 09:20 )

RE:

breakermind said:

Hi

How to move up or down Moving Average?

How to move the moving average as shown in the picture below


Maybe someone has a similar indicator?

Or how to draw poly line like this from moving average (bold red one but not use sma function)?

Thanks and best regards

You could adapt the indicator Envelopes: /algos/indicators/show/281


@Cerunnos

Cerunnos
17 Sep 2013, 12:11

Sorry atrader, the article "orders every hour" I've overlooked. Thanks for the support


@Cerunnos

Cerunnos
15 Sep 2013, 09:25 ( Updated at: 21 Dec 2023, 09:20 )

RE: RE:

fzlogic said:

        protected override void OnBar()
        {
            // Put your core logic here
            var index = heiken.closeha.Count - 1;
            if (heiken.closeha[index] > heiken.openha[index])
                Print("green");
            else
                Print("red");
        }

I think that for the last bar it may not produce correct results. Notice in the screenshot how there is both colors in certain candles.

Thanks for help. I have one more question in this context. Within my Robot I'm using OnTick () method instead of onBar (). But I need some kind of bar-counter:
If a bar has the color blue in the next three bars and a further condition is given, then the robot should enter an order. How can I do that? Thanks


@Cerunnos

Cerunnos
14 Sep 2013, 09:28

Price Action Channel Indicator

Done. The indicator Envelopes does the same...

/algos/indicators/show/281


@Cerunnos

Cerunnos
11 Sep 2013, 15:01

RE: RE:

algotrader said:

This one http://www.earnforex.com/metatrader-indicators/Pinbar-Detector

can be converted with 2calgo.com

Thank you very much! After the conversion the indicator works very well!

Note: The conversion with 2Calgo.com does not work with my internet explorer 9. But there are no problems with using an alternativ browser like Chrome...


@Cerunnos

Cerunnos
12 Aug 2013, 14:31

RE:

cAlgo_Development said:

In nearest future we are going to implement an ability to restarts robots automatically when cAlgo is restarted.

This planned feature is a must in VPS systems and would contribute to greater safety. Hopefully it is coming very soon (for example as an NT service with parameter <starting Robot>) ...


@Cerunnos

Cerunnos
05 Aug 2013, 11:05 ( Updated at: 21 Dec 2023, 09:20 )

Actually yes


Hi. My current robot now works in longer phases sideways quite well - only little loss (see graph). At least in the last 12 months ...
With high volatility / short-term trends (short / long) he is making good profits. Several months of the year should therefore be very profitable for gold trading. For about three weeks I am using a live account and it looks pretty good. Hopefully it stays that way...

 

 

 

 

 


@Cerunnos