My new strategy enters at market incorrectlly

Forums ProRealTime English forum ProOrder support My new strategy enters at market incorrectlly

Viewing 8 posts - 1 through 8 (of 8 total)
  • #156260

    Hi, I’ve a problem with a strategy. It’s a simple strategy that buy when the value of the indicator leaves -100 and sell when the value of the indicator leaves 100.

    But I don’t know why strategy has wrong signals. I’ve tried with other markets, but I’ve the same problem. It’s probably an oversight of mine but I can’t find it. Thank you to those who want to help me.

    #156275

    Give your topic a meaningful title.Describe your question or your subject in your title. Do not use meaningless titles such as ‘Coding Help Needed’.

    Thank you 🙂

    If your code is not hundreds of lines, post it please.

     

    #156311

    Sorry for my title Roberto.

    Here the indicator:

    And here the strategy

    Thanks

    #156368

    Firstly, your indicator returns 1 for both sell and buy signal making them difficult to see on the chart, I suggest that you replace lines 21 and 24 of your indicator with:

    you don’t have to change the code in your strategy because they are TRUE being <> 0, but can easily be spotted on the chart.

    Secondly, you have added a variable named NumContrattiMax, but it can only be 1 unless you set line 1 to TRUE.

    Thirdly, you have added two variables, TPLong and SLLong as if you wanted to make those values for Long trades different from the Short ones, but you are using the same variables for both Long and Short trades.

    The trade you are talking about seems to have been opened on Dec. 7th at 01:00 (you did not specify any daye & time, which you should always do, instead) accorduing to the SHORT signal from the prior candle as you can see from my pic (-50).

    Everything seems fine to me.

     

    #156379

    Thank you Roberto.

    1. I’ve changed to -50 and 50 so I can see better on the chart.
    2. Yes, that’s right, this is a generic strategy that I use to test my ideas. So it’s not all fine. I need to see how the indicator works. But you’re right, it’s useless if the first line is set to “False” value.
    3. Yes, that’s right, as point 2, I’ve use this code to see how the indicator works.

    The different between me and you is the TD value. In that trade I’ve the indicator at 100 not less than 100. You can also see that I’ve not -5 sell signals on the bottom of the chart. I’ve dont’t understand why.

    #156387

    Same problem on 1 hour DAX chart.

    3 strange position that I’ve circled

    #156417

    Prova ad usare  questa versione  dell’indicatore:

    Try using this version:

     

    #156419

    Same result Roberto.

    It’s not so important, this indicator doesn’t do what I’m expected, and I think that I don’t use in the future. Anyway it’s very strange, I’ve write many strategies in the past and this is the first time that happen this strange behavior

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

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