Forums › ProRealTime English forum › ProOrder support › Error I'm not sure about: negative_or_zero_param › Reply To: Error I'm not sure about: negative_or_zero_param
Hi Roberto,
I had another system stop on me today, after I tried to implement the change that you mentioned above.
The system backtested ok no problems, got the system running, then the same error led to system shutdown. Again, the system was in the market for 1 bar, then quit with an error at the end of that bar.
The code that I used is below – are there any problems with it? This is taken from the code version on the autotrading popup of running codes from the system that had the error today.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
MM = Exponentialaverage[max(1,min(period,period))](close) //pente = (MM-MM[lookback])/lookback //trigger = Exponentialaverage[Period](pente) ADJASUROPPO = ((MM-MM[max(1,min(lookback,lookback))])/pipsize) / (max(1,min(lookback,lookback))) ANGLE = (ATAN(ADJASUROPPO)) if angle>0 then r=0 g=255 else r=255 g=0 endif RETURN angle coloured(r,g,0) style(histogram) as "Angle", 0 as "level 0" |
The only other thing that I can see that is different between some code i have that is error free and code that is giving me errors is per below.
|
1 2 3 4 5 6 7 |
ha = highest[barindex](account) if account < ha*0.9 then sell at market exitshort at market quit endif |
I understand the concept stated above that period cannot be <1 – though – that said – I have numerous examples from working live trading code where [0] is used – below is an example:
|
1 |
Upper = HIGHEST[a](CLOSE[0]) |