Shares4us
Shares4us's avatar

Info

Username:Shares4us
Name:Shares4us
Member since: 01 Apr 2020

About

None

Signature

None

Last Forum Posts

@Optimization so slow it actually will not finish:  04 Jun 2023, 00:30


If you write a tiny scalper and want to optimize it over a period of 6 or more months. ctrader optimization is soooo slooooowwww it actually FAILS!

What happens: 

scalps can be 5000 to 15000 orders per month per symbol.

ctrader for some reasons keeps its logs, events and history in memory.

thus your mem fills up and the system starts to swap => Enormous overhead and exceptional slow performance.

Is there a solution to this problem?

Can I switch off the events / log storage in optimizing or rerout it to disk or skip all those double/triple messages being generated?

Kill double messages example:

(EVENTS)0-1 Create Limit Order03/01/2023 02:30:00.591€ 1k0.01 LotsSell1.06760----10 000.00
(LOG)03/01/2023 02:30:00.591 | Placing Limit Order to Sell 1000 EURUSD (Price: 1.0676)
(LOG)03/01/2023 02:30:00.591 | → Placing Limit Order to Sell 1000 EURUSD (Price: 1.0676) SUCCEEDED, PendingOrder OID1

could become:
(EVENTS)0-1 Create Limit Order03/01/2023 02:30:00.591€ 1k0.01 LotsSell1.06760----10 000.00
or 
(LOG)03/01/2023 02:30:00.591 Placing Limit Order to Sell 1000 EURUSD (Price: 1.0676) SUCCEEDED, PendingOrder OID1

or when modifying:

(EVENTS) 5-1 Position Modified (T/P) 03/01/2023 03:15:22.773 € 1k 0.01 Lots Sell	1.06710	1.06410	-0.00 0-9 999.94
(LOG)03/01/2023 03:54:34.471 | Modifying position PID1 (SL: null, TP: 1.06336)
(LOG)03/01/2023 03:54:34.471 | → Modifying position PID1 (SL: null, TP: 1.06336) SUCCEEDED, Position PID1

could become:
 (EVENTS) 5-1 Position Modified (T/P) 03/01/2023 03:15:22.773 € 1k 0.01 Lots Sell	1.06710	1.06410	-0.00 0-9 999.94
or
(LOG)03/01/2023 03:54:34.471 Modifying position PID1 (SL: null, TP: 1.06336) SUCCEEDED, Position

Another solution could be:
If memory reaches a certain level start dump the stuff to disk ( we all have SSD nowadays). It is much more important to finish optimizing than being fast in checking out the results.

Yet another solution could be
Log, but when it went OK clear it from the log. ( if all goes well you will see the data in the orders/positions/history later on.

or combine all three of them ;-)

Best rgds

PS build  Memory management into optimization please?!?! and implement Start where you left of in optimizing!

@Optimization so slow it actually will not finish:  04 Jun 2023, 00:30


somehow the system messed up and posted double!

See: 

@Max equity/Pips DrawDown property in Position:  25 Apr 2023, 15:47


Hi.
In order to calculate the quality of a closed position not only the profit pips but also the max negative equity impact is important.
So an extra property 
MaxEquityLoss would be nice.


Best regards!

@Bar.LoadMoreHistory() on multiple timeframes and multiple indicators fails in backtesting & optimizing; please enable it !:  24 Apr 2023, 19:50


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 ;-)

@4.7.9 Market replay indicators:  24 Apr 2023, 19:46


GREAT thanks!

@4.7.9 Market replay indicators:  23 Apr 2023, 21:25


How to add indicators to the great new replay screen?

@Bar.LoadMoreHistory() on multiple timeframes and multiple indicators fails in backtesting & optimizing; please enable it !:  23 Apr 2023, 20:52


When you are using indicators that consume data from other timeframes on backtesting, you need to make sure that they get enough data from the other
timeframes so that they can display the correct values for the date the backtesting starts, also indicators sometimes need more data to be OK.


Bars.LoadMoreHistory() is great for that puprose but much to everyones surprise it is not implemented for backtesting and optimization.


This has been an issue for a while now and Spotware told us it was by design (later on it was not implemented) and gave a workaround to start .backtesting
earlier and wait until the wanted date has arrived.
It is indeed a workaround and an ugly one too. It makes alll our lib routines that are based on calculating timebased things go bezerk.

I always thought the backtesting schould be functionality wise the same as on Life so please fix ASAP.

@Withdrawal and deposit detection.:  23 Apr 2023, 20:40


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.

@Ctrader .algo file is not picking up a successfull vs2022 build.:  23 Apr 2023, 20:16


@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.

@Ctrader .algo file is not picking up a successfull vs2022 build.:  15 Apr 2023, 16:18


@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,

Notification Publishing copyrighted material is strictly prohibited. If you believe there is copyrighted material in this section you may use the Copyright Infringement Notification form to submit a claim.

No uploaded.

Warning! Executing cBots downloaded from this section may result in loss of funds. Use them at your own risk.

No uploaded.