Topics
Replies

firemyst
25 Nov 2023, 09:30 ( Updated at: 26 Nov 2023, 07:27 )

__

You have to code it yourself to do the calculation if you don't want to use the chart tool to manually show the distance.


@firemyst

firemyst
25 Nov 2023, 09:27 ( Updated at: 26 Nov 2023, 07:27 )

Same here! I've noticed too

And have posted about it previously, but nobody from @Spotware has responded nor addressed the issue:

 

https://ctrader.com/forum/calgo-support/41630

 

 


@firemyst

firemyst
25 Nov 2023, 09:24

__

Can you post example code and example output that demonstrates your issue?


@firemyst

firemyst
25 Nov 2023, 09:24

_

Can you post example code and example output that demonstrates your issue?


@firemyst

firemyst
21 Nov 2023, 01:30

Positions.FindAll(yourPosition.yourLabel, Symbol.Name)

You need to give each of your positions a unique label when creating them.

Then, when you start your bot, check for them if you know there's open positions:

Positions.FindAll(yourPosition.yourLabel, Symbol.Name)


@firemyst

firemyst
10 Nov 2023, 05:40 ( Updated at: 10 Nov 2023, 06:26 )

RE: RE: CheckBox alwyas clicked

eynt said: 

Thank you.

It does work, however, I have another problem. I changed the code so it would change the indicator's parameter which is called LOAD_INDICATOR. However, although the print says its value is changed, when I go to the object manager to see the indicator's parameter value, over there it's not changed.

 

 

[Parameter(DefaultValue = false)]        public bool LOAD_INDICATOR { get; set; }private void CheckBox_Changed(CheckBoxEventArgs e)        {            Print("CheckBox_Changed 1");            LOAD_INDICATOR = (bool)e.CheckBox.IsChecked;            Print("LOAD_INDICATOR= " + LOAD_INDICATOR);        }

Looks to me like your cast is wrong.

You appear to be converting “e” to a bool, which I'm sure isn't what you want to do. :-)


@firemyst

firemyst
10 Nov 2023, 01:21 ( Updated at: 10 Nov 2023, 06:26 )

Try contacting @PanagiotisCharalampous


@firemyst

firemyst
10 Nov 2023, 01:15

You haven't added any event handlers to your checkbox.

 

You also need to add the checkbox to a canvas, and then add the canvas to the chart.


checkBox.Checked += CheckBox_Checked;
checkBox.Unchecked += CheckBox_Unchecked;
Canvas checkboxCanvas = new Canvas();
checkboxCanvas.AddChild(checkBox);
Chart.AddControl(checkboxCanvas);


@firemyst

firemyst
31 Oct 2023, 04:03

RE: RE: Bug in History/HistoricalTrade

VEI5S6C4OUNT0 said: 

firemyst said: 

Have you written anything to the logs or confirmed that the HIST object actually has data and isn't null?

var HIST = History.OrderByDescending ( trade => trade.ClosingTime ) .Take ( 1 ) ;  


 

Yes I tried adding an ExecuteMarketOrder (…….. as part of OnStart  and still no trades after that one , it just does nothing.

UPdate the entirety of your code with a Print statement after every conditional check to see where it gets to.

 

Unless you're using Visual studio and can debug?


@firemyst

firemyst
27 Oct 2023, 03:27

99% sure you can't.


@firemyst

firemyst
27 Oct 2023, 03:26

Have you written anything to the logs or confirmed that the HIST object actually has data and isn't null?

var HIST = History.OrderByDescending ( trade => trade.ClosingTime ) .Take ( 1 ) ;  


 


@firemyst

firemyst
26 Oct 2023, 01:18 ( Updated at: 26 Oct 2023, 05:35 )

It's not yet a feature in cTrader, and has been seriously lacking for some time - they need to up their game to keep up with the competition.


@firemyst

firemyst
26 Oct 2023, 01:17 ( Updated at: 26 Oct 2023, 05:35 )

No. cBots essentially can't disable anything in the cTrader interface.


@firemyst

firemyst
26 Oct 2023, 01:15 ( Updated at: 26 Oct 2023, 05:35 )

How about posting a screen capture of the “other extraneous elements” you'd like removed so people actually know what you're referring to as there might be options already to have them removed.


@firemyst

firemyst
26 Oct 2023, 01:14 ( Updated at: 26 Oct 2023, 05:35 )

Have you tried installing it without being signed in to your One Drive?


@firemyst

firemyst
26 Oct 2023, 01:12 ( Updated at: 26 Oct 2023, 05:35 )

It would be even better if you post this in the appropriate forum:

 

https://ctrader.com/forum/suggestions

 


@firemyst

firemyst
26 Oct 2023, 01:04

Those properties aren't available, which is a pain.

You have to do it separately, which is even more of a hassle :-/

 


@firemyst

firemyst
26 Oct 2023, 01:02

Run it on Demo, see how the trades are playing out, and re-evaluate your strategy. 

 

Also make sure when running the test simulator that you're using tick data rather than M1 bar data


@firemyst

firemyst
23 Oct 2023, 02:12

@Spotware please delete this spam


@firemyst

firemyst
18 Oct 2023, 11:52

RE: RE: Is there any way to retrieve the bar's bar count at which the position was entered?

JINGXUAN said: 

 

and it says :

‘Position[]’ does not contain a definition for ‘EntryTime’ and no accessible extension method ‘EntryTime’ accepting a fist argument of type ‘Position[]’ could be found

 

Of course it doesn't contain a definition. Your getting Long/Short positions returns arrays of Position objects; my example is with a single Position object. 

The property “EntryTime” is for a single Position object, not an array of Position objects. 

 

 


@firemyst