Topics
16 Jun 2019, 05:35
 1417
 5
06 Jun 2019, 17:34
 1255
 3
01 Jun 2019, 00:07
 2519
 2
16 May 2019, 04:33
 1513
 3
08 May 2019, 00:41
 1250
 3
07 May 2019, 13:26
 1104
 1
26 Apr 2019, 04:45
 1764
 5
24 Apr 2019, 21:34
 1126
 1
Replies

alexk
14 Aug 2016, 23:41

Ah!!!!! Thank you very much for that explanation.  I will do some testing and see if that's what's happening in my case.  I bet it is.

So, I would just program the robot to not trade with a negative spread during back testing, so i get more realistic results but leave it in during live trading just in case I get lucky.

   

   


@alexk

alexk
14 Aug 2016, 20:10

RE:

croucrou said:

I don't know, but isn't this related to the question I have asked here:

/forum/cbot-support/10059

I looked at your thread but not sure if its the same thing.

At first this looks like an asynchronous verses synchronous issue.  but the trades stop after a period of time.  It occurs on specific days like 7/9/15 and others. 

 


@alexk

alexk
14 Aug 2016, 20:06

why would a negative spread have anything to do with it?  it seems to me like more of a problem with the backtesting engine 


@alexk

alexk
04 Jul 2016, 20:05

C'mon. This is critical. nothing should be more important than getting this feature added.


@alexk

alexk
07 Jul 2015, 16:46

This post was removed by moderator.


@alexk

alexk
06 Jul 2015, 17:45

WHAT? since when?  I've asked for indicator code before and there was never a problem.


@alexk

alexk
25 Jun 2015, 17:09

RE:

Spotware said:

Dear Trader,

There is a formula to calculate the gain/loss in percentage: 

(current price - open price) / open price.

We hope this helps you.

Yes, I know that formula but how is the interface calculating the percentage.  What open price is it using?


@alexk

alexk
23 Apr 2015, 10:00 ( Updated at: 21 Dec 2023, 09:20 )

Here is what I am talking about.  how is that calculated and is there an indicator to see the calculations historically

 


@alexk

alexk
22 Apr 2015, 03:16

Why was all the reference code taken down?


@alexk

alexk
21 Apr 2015, 08:30

 you just need to check the tick volume in the OnTick or OnBar event.  Its MarketSeries.TickVolume.LastValue;


@alexk

alexk
19 Apr 2015, 20:10

I'm not sure how you would even do that in cAlgo.  I thought they have to be the same.  Do you have an example?


@alexk

alexk
19 Apr 2015, 18:22

I think what I was looking for was just this.ToString()

It returns the name of the Algo.  It is for logging data into a separate database.


@alexk

alexk
17 Apr 2015, 08:40

I posted an example here:

/algos/indicators/show/819


@alexk

alexk
16 Apr 2015, 17:35

RE:

Sorry, I meant to say that I if i use the indicator in a cbot that only trades EURUSD I get an error if I try to back test it.

 

lec0456 said:

I have a multi symbol indicator that only trades EURUSD but I get an error if I try to back test using it.

 


@alexk

alexk
16 Apr 2015, 17:33

I have a multi symbol indicator that only trades EURUSD but I get an error if I try to back test using it.


@alexk

alexk
16 Apr 2015, 00:07

Yes, that is what I eventually did.

 

I set a global bool flag called nextbarto true  in the OnBar event.

 

In the OnTick event I check the flag and then set it to false.

 

This was probably a special case for me because I have an indicator to trade at specific times that is dependent on the time frame being used.

So if I set my algorithm to start trading at 8am if I completed a trade within one bar, the algo would start trading again.  The required behavior was for it to stop. Now it looks at the nextbar flag  if its in the middle of a candle and does not start trading.unless no successful trade is made, then it continues trading. 

 

 


@alexk

alexk
15 Apr 2015, 21:42

They used to have it posted in the samples section.  Anyway I found the code from when I downloaded it before..


@alexk

alexk
02 Apr 2015, 18:15

RE:

comment was removed by moderator


@alexk

alexk
29 Mar 2015, 09:33

One lot is 100,000 volume units.  So if you're account is in USD,  All you have to do is divide by the leverage and multiply by the exchange rate

 

for example (100,000*1.09)/300 


@alexk

alexk
05 Mar 2015, 04:34

When I use Trade.Executing it gives a warning that this is obsolete.

 

What is the new way to get this functionality


@alexk