Profit (loss) intermediate

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #100044 quote
    Be-nBe-n
    Participant
    Average

    Hello everyone !

    A small diagram is better than a long speech! šŸ˜‰ Here is this diagram attached. I increment a loop that I reset to 0 according to the conditions. Inside each loop, I take positions.

    I would like to determine my profit (or loss) for each loop (profit 1, profit 2, profit 3 …). I’m struggling. Could you enlighten me?

    Thank you for your help !!

    FOR i = 0 to firstloop DO
    
    profitintermediate = strategyprofit [0] -strategyprofit [i]
    
    NEXT

     

    Without conviction …

    profitintermediate-min.jpg profitintermediate-min.jpg
    #100047 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Firstly you must know when eachĀ  group starts and ends, otherwise it’s impossible to determine.

    Secondly, once you know that one group start, say 60 bars ago, and ends 35 bars ago, then you don’t need a FOR…NEXT loop, simply compute the difference between STRATEGYPROFIT[35] and STRATEGYPROFIT[60].

    What are those numbers on the paper, 0…8, then 0 again (why again?)…3, and so on? Bars are numbered sequentially from 0 to the current one which ca be number 63856, there is no other bar identified by 0 than the very first one!

    Be-n thanked this post
    #108456 quote
    Be-nBe-n
    Participant
    Average

    Thx for all robertogozzi ! šŸ˜‰ I will post my solution soon !

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTimeā„¢ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Profit (loss) intermediate


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Be-n @be-n Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Be-nBe-n
7 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/06/2019
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...