Topics
11 Sep 2024, 10:23
 0
 60
 0
25 Apr 2023, 15:47
 3
 743
 3
05 Oct 2022, 09:03
 1
 826
 2
04 Aug 2022, 21:07
 639
 2
23 Jul 2022, 16:57
 1
 1006
 1
Replies

Shares4us
07 Sep 2024, 12:59

RE: RE: RE: RE: RE: Very simple issue

PanagiotisCharalampous said: 

tuuguu177 said: 

PanagiotisCharalampous said: 

tuuguu177 said: 

PanagiotisCharalampous said: 

Hi there,

No this is not possible at the moment.

Best regards,

Panagiotis

Hello

How to make line into transparent at coding?

Hi there,

You need to set make your line's color transparent by setting the alpha to 0. See below

var color = Color.FromArgb(0,255,0,0); 

Best regards,

Panagiotis

Color.FromArgb(0,255,0,0)

Is 4th transparency value? I changed 4th value with 0 and 90. But there is not any change of line transparency

the first one, which determines the alpha

use LineColor="00000000" // first 2 is transparancy


@Shares4us

Shares4us
06 Sep 2024, 14:02

RE: RE: RE: RE: RE: RE: RE: RE: RE: using Bar collection and indicators (eg DMS) in background job.

PanagiotisCharalampous said: 

Shares4us said: 

No there isn't

may I ask why?  ctrader itself uses headless indicators and bots in back testing and optimisation . Would be nice if we could use this to!

There is no specific reason. Such a feature is just not implemented. Also you asked about accessing plugins and backtesting, not cBots and indicators

You’re right. Indicators and bots was related to the initial question.


@Shares4us

Shares4us
06 Sep 2024, 14:02

RE: RE: RE: RE: RE: RE: RE: RE: RE: using Bar collection and indicators (eg DMS) in background job.

PanagiotisCharalampous said: 

Shares4us said: 

No there isn't

may I ask why?  ctrader itself uses headless indicators and bots in back testing and optimisation . Would be nice if we could use this to!

There is no specific reason. Such a feature is just not implemented. Also you asked about accessing plugins and backtesting, not cBots and indicators

You’re right. Indicators and bots was related to the initial question.


@Shares4us

Shares4us
06 Sep 2024, 11:11

RE: RE: RE: RE: RE: RE: RE: using Bar collection and indicators (eg DMS) in background job.

No there isn't

may I ask why?  ctrader itself uses headless indicators and bots in back testing and optimisation . Would be nice if we could use this to!


@Shares4us

Shares4us
06 Sep 2024, 11:11

RE: RE: RE: RE: RE: RE: RE: using Bar collection and indicators (eg DMS) in background job.

No there isn't

may I ask why?  ctrader itself uses headless indicators and bots in back testing and optimisation . Would be nice if we could use this to!


@Shares4us

Shares4us
05 Sep 2024, 13:33

RE: RE: RE: RE: RE: using Bar collection and indicators (eg DMS) in background job.

PanagiotisCharalampous said: 

Shares4us said: 

I have a backgroundworker that needs to use some indicators(eg DMS) while running calculating some MTF bars.
The values of the indicators are to be used in the backgroundcalculations and the indicators should preferably be local to the static backgroundworker.
Usage like var O = Bars[10].Open;
and like
var  RS = Indicators.RelativeStrengthIndex(closePrices, entry.14);
var I DM = Indicators.DirectionalMovementSystem(entry.14);

How to achieve that without invoking the main thread?

You can't. If you need data from the Bars object, you need to work on the main thread.

Ok. Related Question. Is there a way to start a Plugin from an indicator or Cbot. Alternate: can i start  Backtesting (from plugin) in Indicator/Cbot?


@Shares4us

Shares4us
26 Aug 2024, 10:03

RE: RE: RE: using Bar collection and indicators (eg DMS) in background job.

I have a backgroundworker that needs to use some indicators(eg DMS) while running calculating some MTF bars.
The values of the indicators are to be used in the backgroundcalculations and the indicators should preferably be local to the static backgroundworker.
Usage like var O = Bars[10].Open;
and like
var  RS = Indicators.RelativeStrengthIndex(closePrices, entry.14);
var I DM = Indicators.DirectionalMovementSystem(entry.14);

How to achieve that without invoking the main thread?


@Shares4us

Shares4us
23 Aug 2024, 15:28 ( Updated at: 23 Aug 2024, 17:18 )

RE: using Bar collection and indicators (eg DMS) in background job.

Ofcourse, sorry for being that brief.
I have a backgroundworker that needs to use some indicators while running calculating some MTF bars. the values of the indicators are be used in the backgroundcalculations and the indicators should preferably be local to the backgroundworker (static)
 

 


@Shares4us

Shares4us
23 Aug 2024, 11:42

RE: RE: RE: RE: RE: Bars can only fetch latest 200 bars

PanagiotisCharalampous said: 

This method does not work on backtesting at the moment. If you need more bars for backtesting, you can start your bactesting at a previous date.

That's not a good solution you will have to change your code just for the sake of backtesting & optimizing if you use duration based calculations.
 


@Shares4us

Shares4us
23 Aug 2024, 11:38

if(Positions.Count > 0) 
{
}
else
{
}

@Shares4us

Shares4us
02 Nov 2023, 20:50

it's a bug somewhere in ctrader.automate 1.0.8
It does not write to the correct directory:

outputWindow:
1>BarneyStructureBreaks -> C:\Users\xx\Documents\cAlgo\Sources\Indicators\MyBot \MyBot \bin\Debug\net6.0\MyBot .dll
1>BarneyStructureBreaks -> C:\Users\xx\Documents\cAlgo\Sources\Indicators\MyBot \MyBot \bin\Debug\net6.0\MyBot .algo
1>MyBot -> \MyBot .algo

just  uninstall 1.0.8 (tools/nuget package manager …)
Then install 1.0.7
and your ouput wil look like:
1>BarneyStructureBreaks -> C:\Users\xx\Documents\cAlgo\Sources\Indicators\MyBot \MyBot \bin\Debug\net6.0\MyBot .dll
1>BarneyStructureBreaks -> C:\Users\xx\Documents\cAlgo\Sources\Indicators\MyBot \MyBot \bin\Debug\net6.0\MyBot .algo
1>MyBot ->  C:\Users\xx\Documents\cAlgo\Sources\Indicators\MyBot .algo

Works for me!


@Shares4us

Shares4us
19 Sep 2023, 22:21

RE: VS2022 debugging works in vs Automate 1.0.7 but fails to start in 1.0.8

PanagiotisChar said: 

Hi Share4us,

It works fine for me. What exactly doesn't work?

Debugger.Launch() does not get triggered in 1.0.8.
Same Code works in 1.07
 


@Shares4us

Shares4us
14 Sep 2023, 20:18

RE: RE: Figured out!

revert to cTrader.Automate 1.0.7 (Nuget)
That worked for me.


@Shares4us

Shares4us
31 Jul 2023, 07:19

RE: RE:

Hi Panagiotis. Are you sure? Does that make sense?

I mean, If a sell position is triggered on BID and closes on ASK, doesn't it make more sense that the stop loss is calculated on ASK as well? Otherwise it risks setting the stop loss inside of the spread, which means the position would either be immediatelly closed if the stop loss pips is lower than the spread or it simply won't have a SL. 

I think it doesn't make sense.
Maybe spotware should add another prop called StoplossFixed that includes the spread when evaluating.
We now try to overcome this by setting the cTrader SL for shorts inclusive an ‘expected spread’ (for double safety ;-)) and checking it realtime(ontick) in the program.
I know it's not beautifull but it helps a bit.


@Shares4us

Shares4us
19 Jul 2023, 11:45

Spotware said:

Dear trader,

Please let us know which version of cTrader you use.

Best regards,

cTrader Team

cTrader 4.8.15

cTrader.Automate 1.0.8


@Shares4us

Shares4us
24 Apr 2023, 19:50

RE:

Yahoo finally!
Hope it's in the next one!
Thnks for the answer.
that also means some of the suggestions should change status i think ;-)

 


@Shares4us

Shares4us
24 Apr 2023, 19:46

RE:

GREAT thanks!


@Shares4us

Shares4us
23 Apr 2023, 20:40

RE:

great workaround, had something similar. but i'd like Spotware to provide the event it they are able to.
It's a pitty they are totally silent and do not answer these suggestions with a 'is possible or is not possible' so we can write our own libraries for things like this if it will never come from spotware.

 


@Shares4us

Shares4us
23 Apr 2023, 20:16

RE: RE: RE: RE: RE: RE: RE: RE: RE:

@firemyst said:

If you're not willing to do that, then you might be on your own.

yes. it feels like that; It seems no-one understands that it is NOT IN THE CODE, (every cbot/indicator had the same problem)
It is in the way vs2022 builds, because that is where the cAlgo file is written.

But I uninstalled ctrader and uninstalled vs2022 then reinstalled everything and it still did not work.
Then i reinstalled windows (cleaninstall) and the rest and it still did not work.

Then cTrader.Automate 1.7 was released and now it works again!.

It is a pitty we will probably never know why it failed but Spotware knows because they silently fixed it in 1.7.

case closed.


@Shares4us

Shares4us
15 Apr 2023, 16:18

RE: RE: RE: RE: RE: RE: RE:

@firemyst

But you still havne't posted sample code that "doesn't build" so others cna try reproducing the issue?

?????? What use has code when the problem is not syntactical or in the logic but in the dev environment itself!
If it was I'd posted (as many times before) a test code to prove the problem.
Please look at the images I posted in my inital post. Think about it and you will come to the conclusion it has NOTHING to do with code!

Best rgds,


@Shares4us