Topics
16 Nov 2023, 07:42
 1100
 1
15 Nov 2023, 10:36
 1976
 16
Replies

Spotware
19 May 2014, 12:21

RE: RE:

breakermind said:

Hi,

how get account ID ?

Thanks

Property Account.Number will be added in next release. Stay tuned.


@Spotware

Spotware
19 May 2014, 09:28

RE:

dtniam8 said:

I want to compare loss by amount. For example GrossProfit is less then -10 negative. How would I do that. So far I've been doing

if (GrossProfit < 0) to determine negative but it doesn't help on determine by how much. Please help. Thanks.

if (GrossProfit < -10)

 


@Spotware

Spotware
19 May 2014, 09:27

Dear Trader,

You can post your ideas to vote.spotware.com


@Spotware

Spotware
19 May 2014, 09:26

No cbots do not operate on Android and iOS.

cBots can be run only in cTrader and cAlgo .NET.


@Spotware

Spotware
19 May 2014, 09:24

RE:

VLAV said:

Hello,

How can I get the timestamp of a history bar? For example I would like to know the timestamp of the bar with index 100 (MarketSeries.Close.Last(100) )

Regards,

VLAV

 MarketSeries.OpenTime.Last(100);


@Spotware

Spotware
19 May 2014, 09:19

There is no visual mode in cAlgo backtesting. After backtesting is finished you can you the deal map to analyse all your trades visually.


@Spotware

Spotware
19 May 2014, 09:17

RE: RE:

Timmi said:

Spotware said:

In order to normalize values of indicator you need to know about visible min and max of another indicator. cAlgo API doesn't expose such information at the moment.

Currently drawing two indicators with independent scales into one panel is not possible.

what if you bring both onto a common scale?  

using formulas to bring them to a common denominator? 

You can try to do that. If you have any example please share it with the community.


@Spotware

Spotware
19 May 2014, 09:13

RE:

dtniam8 said:

This is for cBot. Is there a code example of how to use this Indicator in cBot? I'm lost as to how to find out whether the indicator is above or below the candlesticks with the code.

Please read section Nested Indicators in our API Guides.


@Spotware

Spotware
16 May 2014, 15:19

cAlgo.API isn't thread safe. You have to avoid working with API objects and methods in different threads.


@Spotware

Spotware
16 May 2014, 09:33

You can post your idea to vote.spotware.com


@Spotware

Spotware
16 May 2014, 09:26

You can try to specify absolute path to your dll instead of relative one. For example:

class Test
{
    [DllImport(@"C:\sample.dll")]
    public static extern int gget(out double[] c);
 
}

Probably you also need to specify AccessRigths.FullAccess instead of AccessRights.None.


@Spotware

Spotware
16 May 2014, 09:21

Can you build your robot in cAlgo?


@Spotware

Spotware
16 May 2014, 09:16

Please send all your questions regarding Open API to connect@spotware.com


@Spotware

Spotware
16 May 2014, 09:14

if newStopLoss has more decimal digits than current symbol has, you need compare rounded newStopLoss with current stop loss value. For example:

if (position.StopLoss != Math.Round(newStopLoss, symbol.Digits) || position.TakeProfit != Math.Round(newTakeProfit, symbol.Digits))
  ModifyPosition(position, newStopLoss, newTakeProfit);

 


@Spotware

Spotware
15 May 2014, 17:52

Error "TRADING_BAD_STOPS" happens if you send SL or TP which are not valid in relation to spot prices.


@Spotware

Spotware
15 May 2014, 17:48

You need to move your indicator from

Documents\cAlgo\Sources\Robots folder

to

Documents\cAlgo\Sources\Indicators folder.


@Spotware

Spotware
15 May 2014, 09:52

Dear lamfete,

You specified reference in the wrong format. Instead of 

reference: MySql.Data.dll

you need to write

//#reference: MySql.Data.dll

However such approach is already obsolete. We can recommend you to read an article Legacy References


@Spotware

Spotware
14 May 2014, 14:57

Now you can edit, build and debug your cBots and Custom Indicators in Microsoft Visual Studio. Right click on your cBot or Custom Indicator and press “Edit in Visual Studio”.

Announcing video: http://www.youtube.com/watch?v=NgIdMAyWBak


@Spotware

Spotware
14 May 2014, 14:56

RE:

jobenb said:

Awesome thanks! You will make a lot of people very happy and at the same time become a force to be reckoned with! :-)

Now you can edit, build and debug your cBots and Custom Indicators in Microsoft Visual Studio. Right click on your cBot or Custom Indicator and press “Edit in Visual Studio”.

Announcing video: http://www.youtube.com/watch?v=NgIdMAyWBak


@Spotware

Spotware
14 May 2014, 14:27

Error "The STOP LOSS and TAKE PROFIT of your position cannot have the same value" occurs if you are trying to update protection of your position to the same values.

For example if your position has SL: 1.37084 and TP: 1.37090 and you are trying to update protection to SL: 1.37084 and TP: 1.37090 you will see such error.

You can avoid such error if you will check current values of SL and TP before modification:

            if (position.StopLoss != newStopLoss || position.TakeProfit != newTakeProfit)
                ModifyPosition(position, newStopLoss, newTakeProfit);

 


@Spotware