Topics
Replies
tasr1r1
23 Jul 2020, 09:27
RE:
PanagiotisCharalampous said:
Hi tasr1r1,
I cannot understand why are you doing calculations and not just use the position.NetProfit property.
Best Regards,
Panagiotis
Thats the code that i cant figure out :D
To get position.NetProfit property from specific position
When i looked around the forum, it was said it has to be calculated manually
@tasr1r1
tasr1r1
22 Jul 2020, 17:07
RE:
PanagiotisCharalampous said:
Hi tasr1r1,
What help do you need exactly? Getting the position's net profit?
Best Regards,
Panagiotis
Hi Panagiotis
Yes, the full line code would be (using OnTick())
if (Math.Round((firstbuy - Symbol.Bid) * Symbol.PipSize * FirstVolume) <= xvalue)
{
}
this is not the same as to close all position if reach certain amount which i already have the code. This is only to close one specific position if net profit value is met.
for closing all position i am using this code
var positions = this.Positions.FindAll(Label);
double netProfit = positions.Sum(x => x.NetProfit);
if (Math.Round(netProfit) >= Math.Round(TargetMoney))
{
foreach (var position in positions)
{
ClosePosition(position);
}
}
@tasr1r1
tasr1r1
05 Nov 2019, 13:01
Hi Panagiotis
Yes, I still have the position opened. Have been testing, developing bots using ctrader for years now with position upto 2000 before with no problem on cTrader (main advantage of cTrader vs Metatrader). However, with recent update I think it consume too much resources and may not even a VPS friendly, considering automated trader will need to run via VPS.
a quick walkthrough is maybe to close the chart with opened position in the trade tab as cTrader have no problem retrieving the chart in Automate tab. the Deal Map might be the culprit behind this freeze.
Btw is there any plan to update the ctrader mobile app? as its difficult to filter the trade history on closed position via the app as it has no filter (by day, date or period). it will try to load all history when we open the history tab which is unnecessary.
@tasr1r1
tasr1r1
04 Nov 2019, 10:41
i notice it will happened when i switch the view from automate to trade. I suspect the new panel on the right cause the freeze as i never modified my bot recently and this panel was not there before. I can see from Task Manager Ctrader is using upto 2GB of memory (fyi I have 852 opened position on 1 pair)
I am unable to do the trobuleshooting information as the cTrader freeze beyond use. I am reluctant to share by cBOT due to confidentiality reason
@tasr1r1
tasr1r1
12 Feb 2019, 19:00
it seems like the ctrader is holding the resources even after backtesting was completed until the app become sluggish.. i tried to get back to my codes by scrolling it but it was badly lag until i cant find the line that i was looking for. restarting ctrader helps and i can scroll the code like before
@tasr1r1
tasr1r1
12 Feb 2019, 18:01
my home pc currently opening 3 charts with 2 different pairs (different TF). I started to experience sluggishness again when changing view from Automate to Trade tab when running backtesting on 1 pair. I am sure this is not a problem before but now the mouse cursor will always change to loading mode when clicking between the tab. automation only run by another vps. current open trade is 10.. i used to have over 1k open trade via vps and able to do backtesting and switching view in a snap previously
@tasr1r1
tasr1r1
27 Jan 2019, 20:10
RE:
tasr1r1 said:
hi
im interested with similar ideas, how about a bot what would close all opened positions for that pair (regardless of buy or sell) once net / gross profit (not pips) is reach which is set by user.
is this possible in ctrader automate?
kindly ignore this.. as i cannot delete this comment, item considered closed.
@tasr1r1
tasr1r1
03 Jan 2019, 18:59
RE:
Panagiotis Charalampous said:
Hi tasr1r1,
This is because you have Default Template (Dark) checked. You cannot override this template since it is a built in template. You need to choose a default template (the one with the check box on the side) one of the custom ones.
Best Regards,
Panagiotis
now i understand.. thanks for your kind attention in solving this. the tick did really solved my issues..
sorry for the trouble and long thread for such a small problem.
@tasr1r1
tasr1r1
03 Jan 2019, 17:17
( Updated at: 21 Dec 2023, 09:21 )
its seems that the clicked pop up not captured / visible in the video.. i cannot overwrite the default template. new chart will always load that default when opened. u can see about 30th second in the video, it will load the default with all viewing options if i clicked the Default template when in the saving option
@tasr1r1
tasr1r1
03 Jan 2019, 15:51
Hi Panagiotis
link of the video is here in this google drive link.. it may still pending processing for viewing
https://drive.google.com/file/d/1nxEOQZROcnmd9RqxxJc3fmusvoT9ynNL/view?usp=sharing
@tasr1r1
tasr1r1
11 Aug 2020, 09:20 ( Updated at: 21 Dec 2023, 09:22 )
RE:
cAlgo_Fanatic said:
Hi.. I am trying to disable notification in the cTrader application but the option is always grey out no matter if i stop all bot and only running one instances.
Please help
@tasr1r1