Topics
Replies

firemyst
13 Dec 2024, 00:16

Would also like to include the ability to change more colors in the app for those that are vision/color impaired.


@firemyst

firemyst
11 Dec 2024, 06:12 ( Updated at: 11 Dec 2024, 06:14 )

Are you able to post/share any screen captures of it in action on the charts?

That might get more people's interest.


@firemyst

firemyst
11 Dec 2024, 06:11 ( Updated at: 11 Dec 2024, 06:14 )

If you put your request in the correct forum, Spotware might consider it.

THis is a technical support forum. As such, Spotware doesn't come here, more or less looking for suggestions for improvement.

https://ctrader.com/forum/suggestions/

 


@firemyst

firemyst
09 Dec 2024, 23:52

First thing I would do is use the Print statement and write output to the logging (algo) tab to see what values and such are coming through where, so you can see what's happening.

And/or using visual studio to debug to see what the values are where.


@firemyst

firemyst
09 Dec 2024, 23:44

You can find the logs in the “algo” tab:

I'm not sure how you expect anyone to help you otherwise when you haven't posted any screen captures showing your back-testing settings, or describing what your back-testing settings are.

you should also post your code logic so people can see what may be going on.


@firemyst

firemyst
06 Dec 2024, 09:18 ( Updated at: 06 Dec 2024, 09:30 )

What do you mean not available through the API?

It's right here:

https://help.ctrader.com/ctrader-algo/references/Trading/Positions/Position/#modifyvolume

and you use it like so, where “_p” is your position object:

TradeResult r = _p.ModifyVolume(newVolume);
 


@firemyst

firemyst
03 Dec 2024, 00:31

RE: indicator.Count is 0 when referenced in cBot's first OnBar and changes to correct 201 if referenced again without doing anything else

martins said: 

Further tests with Print(DateTime.Now.ToString("HH:mm:ss.ffff") + …) & some System.Threading.Thread.Sleep calls in both an indicator & a cbot shows that making a reference, in the first OnBar call, to the .Count of a NON-DISPLAY IndicatorDataSeries (one WITHOUT a "[Output …] attribute) DOES NOT trigger the indicator to start making Calculate calls - the Calculate calls for the 200 history Bars seem only to be triggered by the first reference to the .Count of any DISPLAY IndicatorDataSeries (one WITH [Output…]) but even then, the initial zero count is returned to the cBot and incorporated into a Print buffer before the Calculates happen.

Then the OnBar pauses while the 200 or so history Calculates happen for the Bars prior to the backtest start time, then the buffer gets put into log.txt and the Log screen, and subsequent references in the first OnBar to .Count of any display or non-display IndicatorDataSeries give correct values (because all the history Calculates have been run).

It seem in we have to make 2 references in a cBot's first OnBar (when index=0) to an indicator's IndicatorDataSeries having the [Output…] clause (making it, if the indicator were run independently, a display line not just a calculated series) in order to get a proper value - is this correct and documented or is it a bug?

I know this means nothing, but I applaud your research in trying to figure it all out and am looking forward to updates. 


@firemyst

firemyst
01 Dec 2024, 14:30 ( Updated at: 02 Dec 2024, 06:51 )

On every bar, try redrawing the indicator at the “LastVisibleBarIndex”.

Documented here:

https://help.ctrader.com/ctrader-algo/references/Chart/Chart/#lastvisiblebarindex

 


@firemyst

firemyst
01 Dec 2024, 14:26

You can run a cbot on Renko charts. However, how well it runs and performs will obviously depend if its logic is built to handle the way Renko charts work. 

For example, the open price isn't fixed until the current renko bar closes. 


@firemyst

firemyst
01 Dec 2024, 14:24

What's the error you receive?


@firemyst

firemyst
27 Nov 2024, 10:41

Me too. Seems like most of the brokers that offer cTrader, only allow MT4/5 copy trading, and not actual cTrader copy trading.

 


@firemyst

firemyst
27 Nov 2024, 00:15

Why don't you post the code that you have, along with what you'd like it to do, so people can look at it and help you as appropriate?


@firemyst

firemyst
26 Nov 2024, 00:58

Exactly. I'm always having to change the setting to “last added” before viewing anything in the forums


@firemyst

firemyst
26 Nov 2024, 00:57

I don't know what the issue is from looking at the files you posted.

However, brute force way to try and fix it (no guarantees!) – take a backup copy of your actual C# code.

Delete the indicator/cbot from cTrader.

Once deleted, go back and create a new indicator/cbot, adding references as appropriate.

Build it in cTrader.

Then select to edit in Visual studio.

Paste in your C# code from your backup.

hopefully it'll then build successfully.

The only drawback with this approach is if you have anything saved in a “template”, it may have to be readded.


@firemyst

firemyst
25 Nov 2024, 13:21 ( Updated at: 25 Nov 2024, 14:02 )

Here's the basic logic you'll need to try coding yourself:

Use the Timer object (code samples in the link) :

https://help.ctrader.com/ctrader-algo/references/Timer/Timer/#timertick

Set the interval to 1 second.

Then in the timerTick method, count the number of seconds (essentially each time the event method is called)

When it equals 4, run code to set your SL;

When it equals 10, run code to set your TP.

After both have been set, stop the timer.

 


@firemyst

firemyst
25 Nov 2024, 07:21

RE: Deposits-withdrawals collections / events

 

Do you want to add something else here, maybe? What about being pragmatic?

I never said I wanted a solution not involving cBots. What I don't want is a “solution” that can be only achieved if/while a cBot is running. Can't you really understand the difference?
I suggest that you read my previous reply, again.

 

I do understand the difference perfectly. You haven't specified this requirement until now, so you're handicapping people who are reading and wanting to help. 

Please screen capture your post where you explicitly stated this requirement of not wanting a solution while a cbot is running prior to this response if you believe otherwise. 

It's not here:

 

I don't see anything here indicating you want such a solution:

 

It's not here either. Even after your point 2 below, you haven't clarified. In fact, point 3 you explicitly ask how to get this info when starting a cbot: 

 

And it's not in this response that I'm responding to.

So you're criticizing my replies of not understanding the difference between things, when somehow, you expect me to know all your ‘requirements’ that you haven't clearly stated.

 


@firemyst

firemyst
24 Nov 2024, 09:40

Open up the Visual Studio “.csproj” file.

You'll see a section similar to:

<ItemGroup>
   <PackageReference Include="cTrader.Automate" Version="1.*" />
 </ItemGroup>

Or maybe even:

 <ItemGroup>
   <PackageReference Include="cTrader.Automate" Version="*" />
 </ItemGroup>

In previous incarnations, I think the version was hard coded like such:

 <ItemGroup>
   <PackageReference Include="cTrader.Automate" Version="1.1" />
 </ItemGroup>


@firemyst

firemyst
23 Nov 2024, 09:39

RE: RE: RE: Order Execution Error : Nothing to change

PanagiotisCharalampous said: 

firemyst said: 

Below is some sample code you can run on a forex symbol like EURJPY to demonstrate the lack of information.

The output from the log is:

Note that it doesn't say, “Nothing to Change” in the error reported, the symbol name, or anything. Just says, “invalid request”, which to me makes no sense when someone's looking for the actual error message in log files. “invalid request” can happen for any number of reasons, and means we have to keep bothering our broker to find out what and why was an “invalid request”.

 

Ok so at least you get a response and a message. I will suggest to the team to enhance the message.

 

Would you be able to suggest to them they enhance this message too in addition to the one “Nothing to change”? 

This is an example where I had to write the broker because “invalid request” in the logs didn't match with what's actually happening. In this message, it says, “Nothing to amend”, but “nothing to amend” isn't printed out in the error message returned in the calgo logs. 

 

 


@firemyst

firemyst
22 Nov 2024, 06:16

RE: RE: RE: Order Execution Error : Nothing to change

Panagio

 

Ok so at least you get a response and a message. I will suggest to the team to enhance the message.

I suppose the question for the team to consider is - should it even throw an error message if there's nothing to change? As opposed to, say, a warning? (depending on how the server side captures/responds to different severity levels)

 


@firemyst