Topics
16 Nov 2023, 07:42
 1171
 1
15 Nov 2023, 10:36
 2079
 16
Replies

Spotware
12 Sep 2014, 11:58 ( Updated at: 21 Dec 2023, 09:20 )

Custom optimzation criterion has been added:

If Custom criterion is chosen you need to override GetFitness method in your cBot and provide a fitness values based on GetFitnessArgs. The higher fitness the value, the better.

Example 1:

protected override double GetFitness(GetFitnessArgs args)
{
        return args.WinningTrades / args.LosingTrades;//maximize count of winning trades and minimize count of losing trades
}

Example 2: 

protected override double GetFitness(GetFitnessArgs args)
{
        return Math.Pow(args.WinningTrades, 2) / args.LosingTrades;//count of winning trades is more important than count of losing trades
}

 


@Spotware

Spotware
12 Sep 2014, 09:54

I sent probably 10 times to you guys.

We haven't received troubleshooting information yet. Please make sure that your antivirus and firewall software do not block troubleshooting information.

1) My bot is simply dumping bid/ask which is coming in live env ( not in backtesting ) using Print() with using timeFrame of 1 min . I have put my print() statement in OnTick() function and there is no OnBar() function . In this case, i am not able to see bot doing anything and not printing anything on screen even though i can see ticks moving. 

Why is OnTick() function not getting triggered ? I am so confused at this stage . Please help.

Please make sure that your previous OnTick handler finished. In order to do that you can add a print statement to the begging of OnTick handler and one more print statement to the end.

Example:

        protected override void OnTick()
        {
            Print("OnTick started");
            
            //your code here
            
            Print("OnTick finished");
        }

 


@Spotware

Spotware
12 Sep 2014, 09:37

Thank you for your idea. We will consider it. Additionally you can post it to vote.spotware.com.


@Spotware

Spotware
12 Sep 2014, 09:37

Thank you for your idea. We will consider it. Additionally you can post it to vote.spotware.com.


@Spotware

Spotware
12 Sep 2014, 09:30

Please specify which data mode you use in each case.


@Spotware

Spotware
11 Sep 2014, 16:30

Referencing a dll in cAlgo: /api/guides/referencing_dll

How to: Add or Remove References By Using the Reference Manager: http://msdn.microsoft.com/query/dev11.query?appId=Dev11IDEF1&l=EN-US&k=k(VS.ReferenceManager)


@Spotware

Spotware
11 Sep 2014, 16:26

Thank you for your suggestion. We will consider it.


@Spotware

Spotware
11 Sep 2014, 16:25

No, we cannot specify release date.

Name is unique identifier of the line. If you execute draw line command second time for the same name, the existing line will be updated.


@Spotware

Spotware
11 Sep 2014, 16:22

We didn't receive the troubleshooting information. Please send it one more time.


@Spotware

Spotware
11 Sep 2014, 16:19

Certainly I'm missing something and I'm sorry. 
But in cAlgo platform where I find a way to add a reference to a existing project? 

Or should I use Visual Studio? but I miss it

In cAlgo you can add a reference to a .net library or custom indicator. You can use Visual Studio to add a reference to existing .csproj


@Spotware

Spotware
11 Sep 2014, 15:04

Thank you for your suggestion, we will consider it.


@Spotware

Spotware
11 Sep 2014, 11:01

Please press Shift+Ctrl+Alt+T. It will send us troubleshooting information.


@Spotware

Spotware
11 Sep 2014, 10:06

Dear Trader,

cAlgo API doesn't provide such functionality at the moment. We are going to implement it in the future.


@Spotware

Spotware
11 Sep 2014, 10:02 ( Updated at: 21 Dec 2023, 09:20 )

Currently m1 data mode provides 4 ticks for every m1 bar (open, high, low, close). In cAlgo 1.25 we are going to change this behavior: m1 data mode will provide only 1 tick for every bar (open price).

If your strategy requires more ticks we can recommend you to use tick data mode instead of minute bars:


@Spotware

Spotware
10 Sep 2014, 16:36

No, we don't have such error. If market is open you can place an order regardless time of the last quote.


@Spotware

Spotware
10 Sep 2014, 16:18

RE:

RhettG said:

Thanks for the reply.

The web page says "Every time the position moves higher than 1.35300, the stop loss will also move the same distance upwards. The trailing stop will never retreat or move down from its new position."

My question is when exactly is the new stop loss calculated? I am watching 1 minute charts and I see the price move per tick but the stop loss doesn't update for every tick of movement. Right now I am watching an open short trade with an active trailing stop and as the price drops I see the trailing stop update 20 seconds into the minute bar and sometimes 40 seconds into the minute bar but it doesn't even update the trailing stop when the minute close was more than the set amount below the previous stop loss. At one point now, with a trailing stop setting of 3 pips, the stop loss was at 2.7 pips of profit, the close of the previous bar was at 6.2 pips profit and the instantaneous tick was at 6.4 pips of profit. A few seconds later (20 seconds into the minute roughly) the last tick showed 6.1 pips of profit and the stop loss updated to 3.1 pips.

Forgive me I know I'm being pedantic and this is extreme scalping but it is a demo account and I'm really just trying to understand the mechanisms. For reference on my stock market broker I set trailing stops to trigger if the current market price drops by a set amount from the previous day's close or the previous day's limit, whichever is lower. This works well and I completely understand it.

Thanks

 

The stop loss is updated every pip for technical reasons (to minimize server requests)

thanks


@Spotware

Spotware
10 Sep 2014, 14:28

RE:

RhettG said:

Hi

 

Thanks for an excellent tool. I'm rapidly growing to love cTrader.

Could you elaborate on exactly how the trailing stop is working please? When does it decide how much and modify the stoploss according to the rules? I've been placing trades (in demo), applying the trailing stop once they execute, waiting the required pips for them to activate, and watching them follow the price as expected. However I don't see them update the stoploss at the end of a bar (sometimes it updates during the time period) and I'm not sure if its updating the stoploss according to the close, high/low (for long or short trades), or what.

Thanks

 

RhettG

You can find an explanation there:

http://help.spotware.com/trading/positions#advanced_protection


@Spotware

Spotware
10 Sep 2014, 14:24

Yes, we do load testing for both client and server side.

cServer has a limitation for the amount of open positions per account: 2000. We plan to increase this limit in the future. If cServer cannot handle all incoming requests it puts them to the queue. There is no any logic to disconnect clients in case of heavy load.

Please send to engage@spotware.com your account number and broker name. We will troubleshoot the issue.

 

 


@Spotware

Spotware
10 Sep 2014, 11:56 ( Updated at: 21 Dec 2023, 09:20 )

RE:

mijo212 said:

but still doesn't work Tick Time Frame

Yes, MarketData.GetSeries method doesn't support tick time frames. We plan to support it in the future.


@Spotware

Spotware
10 Sep 2014, 09:07

Please specify what do you mean by asking "CTrader is off quotes?"


@Spotware