Replies

ctid205024
05 Nov 2015, 13:12

Yes I do Paul


@ctid205024

ctid205024
05 Nov 2015, 08:06

  • What operating system are you using and the version

windows 10

  • What version of Visual Studio are you using

professional 2013

  • What version of cAlgo are you using and which broker

1.30.58489 icmarkets

  • Have you ever had integration with Visual Studio

This never worked. 

  • Have you ever had it working before or is this the first time you are attempting to use VS with cAlgo

Never worked. 

 

Thanks Paul. 


@ctid205024

ctid205024
04 Nov 2015, 23:39

RE:

There are two Print statements and the log only shows one. 

I can't test this my self because I can't create new indicators due to this problem (/forum/calgo-support/7092) 

 

Spotware said:

Dear Trader,

Thank you for pointing them out to us. We will update them.

Regarding your post about the log, could you please tell us why do you believe that the log is wrong?

 


@ctid205024

ctid205024
04 Nov 2015, 23:31

RE: RE:

Very good mate, thanks heaps!!

mindbreaker said:

//Accessing historical O-H-L-C prices from Robots

// prev bar
int index = MarketSeries.Close.Count-2;


double high = MarketSeries.High[index];

double low = MarketSeries.Low[index];


with trailing

using System;
using System.Linq;
using cAlgo.API;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
using cAlgo.Indicators;
 
namespace cAlgo
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class oodboo : Robot
    {
 
        [Parameter(DefaultValue = 50, MinValue = 0)]
        public int TrailingStop { get; set; }
 
        protected override void OnStart()
        {
            Print("Open position !!!");
        }
 
 
        protected override void OnTick()
        {
 
            //===================================================== Trailing
            if (TrailingStop > 0)
            {
                foreach (var openedPosition in Positions)
                {
                    Position Position = openedPosition;
                    if (Position.TradeType == TradeType.Buy)
                    {
                        //double distance = Symbol.Bid - Position.EntryPrice;
 
                        //if (distance >= TrailingStop * Symbol.PipSize)
                        //{
                        double newStopLossPrice = Math.Round(Symbol.Bid - TrailingStop * Symbol.PipSize, Symbol.Digits);
 
                        if (Position.StopLoss == null || newStopLossPrice > Position.StopLoss)
                        {
                            ModifyPosition(Position, newStopLossPrice, Position.TakeProfit);
                        }
                        //}
                    }
                    else
                    {
                        //double distance = Position.EntryPrice - Symbol.Ask;
 
                        //if (distance >= TrailingStop * Symbol.PipSize)
                        //{
 
                        double newStopLossPrice = Math.Round(Symbol.Ask + TrailingStop * Symbol.PipSize, Symbol.Digits);
 
                        if (Position.StopLoss == null || newStopLossPrice < Position.StopLoss)
                        {
                            ModifyPosition(Position, newStopLossPrice, Position.TakeProfit);
                        }
                        //}
                    }
                }
            }
        }
 
        protected override void OnStop()
        {
            Print("cBot was stoped.");
        }
    }
}

 

 


@ctid205024

ctid205024
04 Nov 2015, 23:29

This post was removed by moderator.


@ctid205024

ctid205024
04 Nov 2015, 23:19

1. It's a clean install. 

2. Parallels 11. 

While we are on the topic of irrelevant issues, I'm also wearing a black long shirt, using a logitech k811 keyboard and my mac is on a white standing desk. The coffee mug is on the left side of the keyboard. 

Are you going to ask me to try it in an upgraded machine? Or are you asking me to use Vmware fusion or a native installation? Perhaps if I change the coffee mug's location? 

 

 


@ctid205024

ctid205024
04 Nov 2015, 23:16

This post was removed by moderator.


@ctid205024

ctid205024
04 Nov 2015, 14:47

"On each incoming new bar, the cBot will look for the order with ...." and yet you implement the functionality on the OnTick() method and not on the OnBar(). 

It should say "On each incoming new tick"... 

 


@ctid205024

ctid205024
04 Nov 2015, 14:43

The log output is incorrect. 

http://cl.ly/image/2r1v1t183y3w

 


@ctid205024

ctid205024
04 Nov 2015, 14:15

Literally all links pointed out by spotware return 404. How basic is to implement an URL redirect when you move content? 


@ctid205024