BardParticipant
Master
Hi, its been some years since the auto systems I had running have been launched, but what I am finding is that once working systems are now producing no positions.
Can anyone figure out what I need to do to get them working? Here is one that isn’t running:
Cheers!
I changed as below and the Algo you posted springs into life (from dead / no trades) and takes trades on US30 Index.
I then GRAPH sizebuy and it shows as 0?
BUY at Market //sizebuy SHARES AT MARKET
BardParticipant
Master
Thanks @GraHal!
It’s odd because “sizebuy” was a legit parameter that triggered trades previously, but now it doesn’t? Does anyone know why?
sizebuy = ROUND((capital *perccap /100)/ margin)
Cheers
Because since 2 years or so, ROUND accept a second parameter to how many decimals you want to round. If there is none, then 0.2 is rounded to 0 and therefore no trade!
It works if you round your contract size to just 1 decimal:
sizebuy = round((capital *perccap /100)/ margin,1)
Backwards Compatibility.
A phenomenon unknown to PRT.
One of the worst exhibits of PRT.
Don’t ask me for examples, but I ran into many examples throughout time. It is incomprehensible that any software developer allows for this.
Something else : A Round command without parameters for the number of decimals to round down to, makes no sense to me in the first place. So if this really has been the case – so be it. But if so … come one. This can’t be serious …
FLOOR
FLOOR
and
CEIL
CEIL
instructions have been added at the same time.
For reference: https://www.prorealcode.com/documentation/round/