How to calculate only losing trades

Forums ProRealTime English forum ProOrder support How to calculate only losing trades

Viewing 9 posts - 1 through 9 (of 9 total)
  • #214292

    Hi

    How to calculate only the losing trades of a day without taking into account the gains of the winning trades of the same day:

    I feel that if I have gains during the day then my loss calculation is wrong

    Best Reguards,
    ZeroCafeine

    #214293

     

    1 user thanked author for this post.
    #214297

    tks you I will try it and post result,

    and what this solution works if I am already in position before Monday, So I don’t want to include the gains and losses of the day before ?

    #214300

    I think this could work. Not tested of course.
    It it does not work you can make it work.

    1 user thanked author for this post.
    #214332

    Thanks for all your answers but I’m having a bit of trouble, how do I get the value of positionperf once the position is closed

    #214335

    Yes, I now see that I changed my example from something like PositionPerfToday = PositionPerfToday + xxxx into what I presented.

    You can combine it with StrategyProfit.

    I think that with these hints you can work it out yourself ? sure you can. You can write code so you can solve this. Maybe it takes a few hours, but you will learn from it again.

    1 user thanked author for this post.
    #214337

    It took me several days to find a solution, and I have more or less found it, but I still have conflicts, so I’m asking again for another method

    tks again 😊

    #214353

    PositionPerf returns the temp performance each bar, while on market. To tally the real loss you must wait for STRATEGYPROFIT to be updated (which occurs when a trade is closed).

    To both count losing daily trades and their total loss (cleared every day) :

     

    1 user thanked author for this post.
    #214360

    @robertogozzi
    And once again the alien has come through with a few lines of magic code, Merci

    I did almost a similar solution but a bit more complicated with more code (More complicated as a beginner), here is an excerpt, your solution seems much simpler and I had not thought to compare the StrategyProfit with StrategyProfit[1]

    I’ll test this out in my head and come back to this post

    tks again for all 😊

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

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