Topics
Replies
keno.clayton15
05 Oct 2020, 01:54
RE:
caglar_G said:
Hi there!
I havent found anything on this subject anywhere, hence this topic.
Does anyone know how long 1 tick is in terms of time/ seconds/minutes?
Ty!
Try reading up on this article guide-to-ctrader-tick-charts which goes into more detail on tick charts.
@keno.clayton15
keno.clayton15
04 Oct 2020, 10:12
RE:
xabbu said:
Dear Keno,
did you try "Positions.Count " instead? For my cBot this works great under all mentioned conditions (high speed, non visual mode) to ensure, that I can`t open more trades then I want to.
Regards,
xabbu
I've tried that before, but in this case I had to use Positions.FindAll because I wanted the bot to check for only the trades that it opened. Unfortunately, it didn't work. However, I did manage to come up with a reasonable workaround to this issue.
So what I've done is to move the logic from OnBar to my Positions.Closed event function. In other words, a new position can only be opened when a trade is closed, either by SL or TP closing. Doing this has prevented extra orders from being created within a few seconds of each other. The bug still exists, but at least there's a bit of a workaround possible.
@keno.clayton15
keno.clayton15
05 Oct 2020, 08:25
RE:
PanagiotisCharalampous said:
Is there an email address I can send the code to instead of posting it here? I'd prefer sharing it only with the devs for troubleshooting. Also, I've already come up with a workaround to the issue, but I'll disable the workaround so that you can reproduce the error.
@keno.clayton15