
Topics
Replies
ChasBrownTH
22 Jan 2016, 21:25
( Updated at: 21 Dec 2023, 09:20 )
RE: RE:
Thanks for the suggestion, but I am calling it every 2 seconds, with a timer, also every minute to write it into mySQL .. both versions get 'crazy' responses sometimes ;(
GoldnOil750 said:
Hi,
are you calling the code on method "OnBar" or "OnTick" ?? usually calling this code in method "OnBar" will wait for the next bar to update it.
///S.Khan
ChasBrownTH said:
The following code is meant to display the count of currently open positions, but it often does not work.
Positions.FindAll(Label);
int totalPositions = Positions.Count;
int buyPositionsCount = PositionsCount(TradeType.Buy);
int sellPositionsCount = PositionsCount(TradeType.Sell);strStats += string.Format("\nPositions: {0} Buys: {1} Sells: {2}", totalPositions, buyPositionsCount, sellPositionsCount);
ChartObjects.DrawText("stats", strStats, StaticPosition.TopLeft);Results are displayed, often they are true, but not always. Please see the screenshot.
Did I forget to 'reset' or properly initialize something important ?
Many thanks to anybody who can help me figure out the cause.
@ChasBrownTH
ChasBrownTH
15 Jun 2015, 19:34
RE:
botmaster said:
Damn.. I wish there was a way to remove post. It was my mistake after all. I was using the wrong period. dah!
... going to get another beer.
Hi BotMaster ;}
Don't feel too bad about making a mistake, we all do it and that is how we learn. Your comments here helped me find one of my own 'glitches', instead of giving up.
cheers, make mine a Carlsberg ...
@ChasBrownTH
ChasBrownTH
15 Jun 2015, 16:39
Hi - I have read of people getting this to work using Crossover, from Codeweavers. Sadly it is a paid product, though they offer a Free Trial. It is about 40 USD if you want to keep it. It worked for me, but there are a few other issues to sort out, Windblows is simply easier, even though I often loathe it ...
PS - I gave your idea votes ;}
@ChasBrownTH
ChasBrownTH
22 Jan 2016, 21:57
Sorry, wish I could edit my earlier message, but that seems impossible ?
I should have mentioned that the mySQL history proves cAlgo is returning 'Nonsense' for HOURS, long after it was true ;(
I have instances with no open trades, but minute by minute 'reports' claiming there are trades Open ..
It baffles me .. can anybody HELP please ? Hello Spotware, is anybody there ? ;)
@ChasBrownTH