Hey,
I`m trading on the Swedish market in Stockholm, OMX 30My trading systems sometimes stops an I get the message “Prorealtime stopped”. I do not think it differs from my other trading systems, that work (for the most part). These e.g. it has never made a trade!
// Conditions to enter long positions
//
// Rikoshett trading system SCA 24 januari 2020 //
// Buy when ricoshet occurs //
// Constructer Erik Olsson //
// Exit days//
// Exit Stochastic //
// Exit Moving Average //
DEFPARAM CUMULATEORDERS = false
n = round(200000/dclose(0))
MM5sell = Average[18](close)
difflow = high[0]-low[0]
diffclose = close[0]-low[0]
rikoshettprocent = diffclose/difflow*100
closeyesterday = close[1]>open[0]
low5 = lowest[2](low)
low5days = low[0]<=low5
rikoshett = rikoshettprocent < 11
trade = rikoshett and closeyesterday and low5days
if trade then
buy n shares at market
endif
if onmarket and close[0] > MM5sell then
sell at market
endif
if onmarket and barindex-tradeindex = 8 then
sell at market
endif
//Stochastic
if onmarket and Stochastic[20,4](close) > Stochastic[2,8](close) then
sell at market
endif
difflow = high[0]-low[0]
diffclose = close[0]-low[0]
rikoshettprocent = diffclose/difflow*100
If High and Low are the same, you’ll get a division by 0 error on line 18.
In your not-running orders (in the ProOrder Autotrading form) you will see an orange triangle (see attachment); you can click on the triangle and will receive an error message one time only.
Regards,
Peter