again martingale to code

Forums ProRealTime English forum ProOrder support again martingale to code

Viewing 5 posts - 1 through 5 (of 5 total)
  • #205950

    Have a great day.

    I have again taken an old indicator from the library, rebuilt it into a strategy and added a temporal component. It is not the holy grail but the result is quite respectable. Explanation attempt is the dependence of the Dax40 on the (strong) us indices and their opening.

    Clear to me is the danger of martingale if you do not have an infinite number of attempts and infinite funds.

    I searched Prorealcode for Martingale and found some things, but there was nothing really suitable. I am sorry.

    What I would like to ask you is that one of you program me here a martingale that after a loss increases the number of positions by 1 position and after a profit decreases the number of positions by 1 position, but at least always trades 1 position.

    Below the code of the strategy and also attached the itf-file.

    #205959

    There you go:

    1 user thanked author for this post.
    #205973

    Thank you, thank you, thank you.
    It’s not the first time you helped me, all the more, thank you!

    #205975

    And thanks again, but it doesn’t fit.

    We start with strategy profit = 0 and trade 1 position. We win the first trade. So the strategy profit is bigger than the strategy profit before. So we continue trading with 1 position.
    Only when we have lost 1 trade, we trade with 2 positions. If we have lost 2 trades in a row, we trade with 3 positions. If we then win 1 trade, the number of positions decreases by 1 position (3 to 2). And so one.
    1 Position we won, 1 position decrease. 1 position we lost, 1 position increase. This is not done with your code.
    Can you code it that way?
    see attached

    #206034

    Danke.

    Ich habe es hier auf Proreal gefunden.

    Ich habe es in die 4HS Storm integriert…

     

     

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

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