Doesn't take long positions?

Forums ProRealTime English forum ProOrder support Doesn't take long positions?

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

    Whats wrong with this code, it only takes short positions and not long. I want to run it on EUR/USD 1 h

    I can’t see whats wrong but I am learning….

     

    #97460

    cond1 is never going to be > ST

    cond2 is always going to be < ST

    I often hesitate to help with code (as I’m great either! 🙂 ) but substitute values in your cond 1 and 2 and you will see.  E.g. high  11230 high – 11210 low / 2 = 10 so it is always going to be lower than ST and never higher … unless you get the biggest spike ever seen? 🙂

    If you use Close > Supertrend etc then it will work.

    #97461

    I suggest to modify lines 10-11 as follows (though this won’t affect performance, it’s just makes code easier to read:

    I think if you switch the order in which trades are opened, Short ones first, the results would be only short trades.

    You are comparing half the range with ST, I can’t imagine what your goal is.

    After line 32 add these lines, then check those values in the variable window of ProBackTest each candle:

    graph Range

    graph Range/2

    graph Supertrend[3,10]

     

     

     

    #97462

    Tnx for the respons, Im am trying too learn the program and how I can program.

    #97468

    Im am trying too learn the program and how I can program.

    No probs, keep on asking no matter how daft it seems … I will probably learn something also! 🙂

    1 user thanked author for this post.
    #97469

    I am trying too program an easy program for the 1 h EUR/USD but i don’t really get it too work. But i am learning every day…

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