How I Can Sleep() My Robot
How I Can Sleep() My Robot
13 Jan 2014, 18:08
Where Is the Sleep() Function in cAlgo API.
Thanks
Replies
waddahattar
14 Jan 2014, 14:18
I need some Idea for make cRobot works like metatrader script .
I try to make loop while(true) into cRobot with Sleep() to allow cAlgo to work without interruption
@waddahattar
waddahattar
14 Jan 2014, 16:35
RE:
Spotware said:
We recommend that you add all logic in the OnTick method instead of using a while loop. Using a while loop with the Sleep method will affect performance.
Is there a way to force the cAlg to trigger OnTick() event from outside cAlgo with some API function .
I Want sometimes to Buy or Sell without wait the Price to change in cAlgo .
@waddahattar
Spotware
16 Jan 2014, 17:28
You could code the logic in the OnStart method and then start the cBot whenever it is necessary. This way you may run script-like cBots that do not depend on incoming ticks.
Very soon cBots will be included in cTrader, so you may attach multiple cBots to a chart and then start and stop whichever one you choose at any given moment.
@Spotware
Spotware
14 Jan 2014, 10:23
To suspend the current thread for a specified number of milliseconds:
We do not recommend that you do this. What is the logic you need implemented?
@Spotware