Topics
06 Jun 2019, 17:34
 1212
 3
16 May 2019, 04:33
 1465
 3
08 May 2019, 00:41
 1203
 3
07 May 2019, 13:26
 1072
 1
26 Apr 2019, 04:45
 1707
 5
24 Apr 2019, 21:34
 1085
 1
Replies

lec0456
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.

   

   


@lec0456

lec0456
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. 

 


@lec0456

lec0456
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 


@lec0456

lec0456
04 Jul 2016, 20:05

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


@lec0456

lec0456
07 Jul 2015, 16:46

This post was removed by moderator.


@lec0456

lec0456
06 Jul 2015, 17:45

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


@lec0456

lec0456
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?


@lec0456

lec0456
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

 


@lec0456

lec0456
22 Apr 2015, 03:16

Why was all the reference code taken down?


@lec0456

lec0456
21 Apr 2015, 08:30

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


@lec0456

lec0456
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?


@lec0456

lec0456
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.


@lec0456

lec0456
17 Apr 2015, 08:40

I posted an example here:

/algos/indicators/show/819


@lec0456

lec0456
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.

 


@lec0456

lec0456
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.


@lec0456

lec0456
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. 

 

 


@lec0456

lec0456
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..


@lec0456

lec0456
02 Apr 2015, 18:15

RE:

comment was removed by moderator


@lec0456

lec0456
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 


@lec0456

lec0456
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


@lec0456