Negative parameter

Forums ProRealTime English forum ProOrder support Negative parameter

Viewing 7 posts - 1 through 7 (of 7 total)
  • #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:

     

    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:

     

    So when the volume = 0 then Pro Order stops. So what I did is:

     

    So 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?

    #138691

    Johann – Please re-read the forum rules before posting again and always use the ‘Insert PRT Code’ button when ever you are putting any code in your posts. I have tidied up your post for you – we like a tidy forum! 🙂

    #138692

    Hi Vonasi

    Apologies did not even know how to use the insert function, but i will find out and use it in future. Thank you. Also do you have a potential solution to my problem?

    #138693

    My suggestion would be to only allow the code to run if volume <> 0

     

    #138702

    Thank 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!

     

    #138707

    I presume that when the close is below the average[10] or when it crosses over, the value returned is either zero or a negative value which is probably why it stops?

    #138709

    Hi Vonasi, just realized I could try the same suggestion you gave:

     

     

Viewing 7 posts - 1 through 7 (of 7 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login