Topics
Replies
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: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, 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: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, 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
Spotware
19 May 2014, 12:21
RE: RE:
breakermind said:
Property Account.Number will be added in next release. Stay tuned.
@Spotware