Topics
Replies
FMogyi
05 Feb 2019, 09:57
These are Trendlines (but doesn't matter). I try with HorizontalLine:
var lines = Chart.FindAllObjects(ChartObjectType.HorizontalLine); foreach (var line in lines) { Print(line.Y); }
and the Error message is same:
Error CS1061: 'cAlgo.API.ChartObject' does not contain a definition for 'Y' and no extension method 'Y' accepting a first argument of type 'cAlgo.API.ChartObject' could be found (are you missing a using directive or an assembly reference?)
@FMogyi
FMogyi
02 Feb 2019, 12:29
Dear Panagiotis,
There are some objects in the chart. I don't know how many. I find them with this code:
var _Objects = Chart.FindAllObjects(ChartObjectType.TrendLine); foreach (var obj in _Objects) { double CalculetY = How? }
So how can I use properly the CalculateY() function to get the Y value for all objects in this example?
Thanks,
@FMogyi
FMogyi
30 Jan 2019, 11:00
( Updated at: 21 Dec 2023, 09:21 )
Dear Panagiotis, Unfortunately we do not understand eaach other. So I try to explain on this chart what I want:
Here are 2 trendlines for example. The price is staying between the lines (sideway market). And once a time beakout action will be happen.
I want to catch this moment. So I need to query by cBot where the trendline stays (price) at the specified time or bar. When the price (or closed candle ) breaks the trendline.
for example: double trendline1 = ObjectGetValueByTime(cart_ID, UpperTrendLine, Time); //Get the current price if (Symbol.Bid > trendline1) BREAKOUT();
@FMogyi
FMogyi
28 Mar 2018, 11:36
( Updated at: 21 Dec 2023, 09:20 )
RE:
Hello,
I have been waiting the answer for more than 1 year!!!
Where stored the cBots messages? In the ...Users\"USER_NAME"\Documents\cAlgo\Journals\"BROKER_NAME aren't"
If I run cAlgo the journal file created with the same line:
2018.03.11 10:21:26.133 | cAlgo started
but the generated messages by my cBots and the runtime error messages are missing!
Thanks.
@FMogyi
FMogyi
02 Feb 2017, 14:14
( Updated at: 21 Dec 2023, 09:20 )
Unfortunatelly backtests data are totally useless. I recommend you (if you want to sell something) run a forward tests more than 6 months on real accounts and show the real performance!
I can show you more thousands gain with 99% modelling quality backtests results without profitable forward tests. Here you can see some examples.
Same EA runs at same broker. 1 month forward test and 1 month 100% modelling quality backtest for same period. The results are totally different!
Best Regards
@FMogyi
FMogyi
30 Jan 2017, 12:23
A little bug in cTrader/cAlgo
1 remark: I use cTrader on VPS where I didn't install cAlgo (cTrader only with the compiled cBots without sources.).
So the cBot Journal directory and files are not available under cAlgo. cAlgo directory has Sources subdir only (with Robots and Indicators) and not more.
I think it would be great if the cTrader installer can create the other important subdirs (as Journal for examle) under cAlgo.
Now If I want to check the cBots journal I have to install cAlgo too.
BR
@FMogyi
FMogyi
26 Jan 2017, 15:02
Hi,
If you use more cBots simultaneously you should use Label parameter (means cBot ID) when managing your positions and orders.
Here is an example for closing:
//
var positions = Positions.FindAll(Label, Symbol); // cBot gets own positions only.
foreach (var position in positions)
{
TradeResult result = ClosePosition(position);
if (!result.IsSuccessful)
{
Print("*** ClosePos Err: {0} {1} {2} {3}", position.Id, position.Label, position.TradeType, result.Error);
error++;
}
else if (debug)
Print("--> {0} ClosePosition Ok.", position.Id);
}
}
Best Regards
@FMogyi
FMogyi
19 Jan 2017, 13:52
Hi, thanks, your answer but I think your advice is wrong. bAuth is initialised bool variables at OnStart and bWeekend gets value at every OnBar function.
The cBot runs for an hours well for a while. The OnTick function was called well more hundreds or more thousands times before the problem occurs.
@FMogyi
FMogyi
25 Feb 2019, 11:55
Brokers allways cheat to steal your money! (8 years experience)-. I do not find correct MT4, MT5 or cTrader broker during this time.
@FMogyi