Topics
Replies
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:
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
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
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
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