Strategyprofit of points

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #89140 quote
    superborstigsuperborstig
    Participant
    Junior

    Hallo Forum,

    is ist possible to get the strategyprofit of the points and not of the money? Something like “strategypoints”?

    Or how can I programm this?

    For Example how can I program the summation of the last close minus the last open? Or maybe the summation of the last “strategyprofit” divided by the last Ordersize?

    I hope someone can help me.

    Best regards

    superborstig

    #89186 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    I think this should do:

    strategypoints = strategyprofit / pointvalue
    #89205 quote
    NicolasNicolas
    Keymaster
    Legend

    The problem is that you don’t consider the leverage used to get the points profit.

    Here is a snippet I found:

    minContract = 1
    
    if(strategyprofit<>strategyprofit[1]) then 
     pnl = strategyprofit-strategyprofit[1]
     size = max(minContract,abs(countofposition[1]))
     onepos = pnl/size
     pointprofit = onepos/pointvalue
     strategyprofitpoint = strategyprofitpoint+pointprofit
    endif
    robertogozzi thanked this post
    #89282 quote
    superborstigsuperborstig
    Participant
    Junior

    Robertogozzi and Nicolas, thank you for your prompt answers!

    Nicolas had the answer I needed.

    Thank you both very mutch!

Viewing 4 posts - 1 through 4 (of 4 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

Strategyprofit of points


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by superborstigsuperborstig
7 years, 9 months ago.

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