Replies

brunoamancio.ti
26 Apr 2017, 18:46

That sounds like observable pattern to me.


@brunoamancio.ti

brunoamancio.ti
26 Apr 2017, 18:43

Just take the newest position and add 5 pips to the price ;)


@brunoamancio.ti

brunoamancio.ti
13 Apr 2017, 21:20

You should practice more programming first. Try refactoring your code so that it is easier to read it and understand it. Nobody will help you with that spaghetti.


@brunoamancio.ti

brunoamancio.ti
13 Apr 2017, 21:01

+1 For update request.


@brunoamancio.ti

brunoamancio.ti
28 Oct 2016, 05:23

I have the same problem to reconnect. I don't understand how spotware can't reproduce it, since you only have to leave a bot running for some time!!


@brunoamancio.ti

brunoamancio.ti
07 Sep 2016, 06:49 ( Updated at: 21 Dec 2023, 09:20 )

Is the .algo file defined as Reference like this?

 


@brunoamancio.ti

brunoamancio.ti
03 Sep 2016, 15:57

RE:

There is no way to edit answers, so, there's a mistake in the code above, but you must find it yourself =)

 

brunoamancio.ti said:

Thanks for your replies =)

 

On top of the others suggestions, I wrote another possibility in the form of an extension method for Positions. Like this it is possible to call this method directly for any position object.

 

    public static class PositionExtension
    {
        public static double GetNetProfitAt(this Position position, double price)
        {
            // 3 USD per 100K units traded
            const double commission = 3/100000d;
            var openComission = position.EntryPrice * position.Volume * commission;
            var closeComission = price * position.Volume * commission;

            var calculation = position.TradeType == TradeType.Buy ? price - position.EntryPrice : position.EntryPrice - price;
            calculation += openComission + closeComission;
            return position.Volume * calculation;
        }
     }

 

 


@brunoamancio.ti

brunoamancio.ti
03 Sep 2016, 15:52

Thanks for your replies =)

 

On top of the others suggestions, I wrote another possibility in the form of an extension method for Positions. Like this it is possible to call this method directly for any position object.

 

    public static class PositionExtension
    {
        public static double GetNetProfitAt(this Position position, double price)
        {
            // 3 USD per 100K units traded
            const double commission = 3/100000d;
            var openComission = position.EntryPrice * position.Volume * commission;
            var closeComission = price * position.Volume * commission;

            var calculation = position.TradeType == TradeType.Buy ? price - position.EntryPrice : position.EntryPrice - price;
            calculation += openComission + closeComission;
            return position.Volume * calculation;
        }
     }

 


@brunoamancio.ti

brunoamancio.ti
03 Sep 2016, 15:32 ( Updated at: 21 Dec 2023, 09:20 )

RE: RE:

Get it on Nuget ;) To do that, you can open the bot on visual studio and just add the nuget package ;)

 

aglctid123 said:

Hello,

i tried to add the Tweetinvi package to calgo using nuget (by command line) but once package installed i do not see it in .net reference or library...

How do you use it ? 

thanks in advance,

Alex

 

Paul_Hayes said:

Also you will what these references or get them from NuGet.

 

 


@brunoamancio.ti

brunoamancio.ti
02 Sep 2016, 04:51

RE:

Spotware said:

Dear Traders,

Thank you for your suggestions. The above API Members are not available yet. We plan to include them in the future.

Has the future arrived yet?


@brunoamancio.ti

brunoamancio.ti
01 Sep 2016, 19:28

@Yurii, actually it's possible, but they would pay for the cloud server to keep clients bots on. That would probably make their service more expensive and they would pass it on to brokers, which would pass on to customers.


@brunoamancio.ti

brunoamancio.ti
01 Sep 2016, 01:13

I've added some functions for cBots developers to use HA data in their bots. 

Check out /algos/indicators/show/1452


@brunoamancio.ti

brunoamancio.ti
31 Aug 2016, 14:00

That doesn't do what I proposed. It just checks the current net profit of all positions and closes all positions if current net profit > specified value.

I want to calculate the net profit at a price different from the current.


@brunoamancio.ti

brunoamancio.ti
30 Aug 2016, 02:49

It should take into consideration:

- Base price (either ask or bid, depending on what you want)

- Target price

- Commission per million units

With that it should be possible to calculate. I wanted to know if something has a snippet with something similar or I have to code it, but I haven't got much time this week. =)


@brunoamancio.ti

brunoamancio.ti
30 Aug 2016, 02:19

RE:

lucian said:

Try  Profit Calculated from :http://www.calgocbots.com/profit-calculated

Do you have the source code? I'd like to be able to see and edit it.


@brunoamancio.ti

brunoamancio.ti
29 Aug 2016, 22:26

You're right! ahaahha, cant believe I didn't see that. ;) Thanks.


@brunoamancio.ti

brunoamancio.ti
28 Aug 2016, 17:56

RE:

lucian said:

Check Spread !

The spread isn't 4 pips on entry! It averages around 0.3 pip!


@brunoamancio.ti

brunoamancio.ti
28 Aug 2016, 12:02

The TP and SL are correct at 20 and 16 pips.


@brunoamancio.ti