Why does strategy open positions repeatedly?

Forums ProRealTime English forum ProBuilder support Why does strategy open positions repeatedly?

Viewing 6 posts - 1 through 6 (of 6 total)
  • #86041

    I am trying to place an order 2,3,4 at positionprice+x or -x

    where as the program is just place at market at every subsequent time

    say if I run the program once it is long for every 2 seconds just it adds one more

     

    I tried even tradeprice(0)+x or -x even that is also not working

    #86043

    I have changed the subject title of your topic as it was meaningless.

    The format for CALL is:

    See here for more info:

    https://www.prorealcode.com/documentation/call/

    I’m surprised that your code runs with the format that you have used.

    #86057

    POSITIONPRICE is the average price of all open positions. In order to add new order at a set distance from the last one, you should use TRADEPRICE instead.

    #86063

    I think that the incorrectly written CALL instruction is resulting in indicator1 and indicator2 always equalling zero and so all the entry conditions are always being met. It seems odd that the incorrectly written CALL instruction does not flag up an error.

    I just tested it on my demo platform and it does:

    Screenshot_1-6

    rama – Are you sure that you have posted the correct code?

    #86067

    The syntax error you have is normal because you don’t have this file into your platform.

    It is possible to use CALL like the way @rama did. Because there are no settings and the indicator name doesn’t have special characters.

    #86068

    because you don’t have this file into your platform.

    Of course – how stupid of me. Not enough cups of tea yet and trying to do five things at once are my excuses!

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

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