Negative parameter
Forums › ProRealTime English forum › ProOrder support › Negative parameter
- This topic has 6 replies, 2 voices, and was last updated 5 years ago by
Johann.
-
-
07/08/2020 at 3:54 AM #138689
Hi Support Team
Hope you can help. I have a code which from time to time have a negative value which stop my strategy in Pro Order.
The one code is:
1234indicator1=(close-average[10](close))indicator2=(average[10](close-average[10](close))c1=(indicator1>indicator2)c2=(indicator1<indicator2)The problem is when the close/price is below the average then the indicator1 returns a negative value which also means indicator2 will be negative, crossing the zero line. I use it as a bearish or bullish indicator the same as a using close>average[10](close) as bullish.
What can I do for the builder to accept the > or < even if the are negative for example if:
indicator1 = -5 and indicator2 = -10 then c1 remains true even if the values are negative without pro order stopping the strategy?The second code is:
123indicator1=volumeindicator2=(high-low)c1=(indicator1/indicator2)So when the volume = 0 then Pro Order stops. So what I did is:
12345If indicator1 < 1 Thenindicator1 = 1Elseindicator1 = volumeendifSo that the calculation continues even when volume = 0. This do not seem to work. Works fine in backtest and demo but not live. Hope you can help?
07/08/2020 at 6:21 AM #13869107/08/2020 at 7:00 AM #13869207/08/2020 at 7:12 AM #13869307/08/2020 at 8:09 AM #138702Thank you Vonasi will try, and any suggestion on the the first code, I try to do the insert code but it does not look the same as yours, sorry!
1234indicator1=(close-average[10](close))indicator2=(average[10](close-average[10](close))c1=(indicator1>indicator2)c2=(indicator1<indicator2)07/08/2020 at 8:33 AM #13870707/08/2020 at 8:36 AM #138709 -
AuthorPosts
Find exclusive trading pro-tools on