MAX DAILY PROFIT -help

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #216538 quote
    tag1tag1
    Participant
    New

    Hi can someone help me to add the a max daily profit parameter to my algo. I’m happy to pay for this service.

    #216549 quote
    NicolasNicolas
    Keymaster
    Legend

    Here is a code to limit the profit for each day:

    maxdailyprofit = 100
    
    if intradaybarindex=0 then 
     profit = 0
    endif 
    
    if strategyprofit<>strategyprofit[1] then 
     profit=profit+(strategyprofit-strategyprofit[1])
    endif 
    
    if profit<maxdailyprofit then 
     //put your BUY or SELLSHORT entries here
    endif 
    
Viewing 2 posts - 1 through 2 (of 2 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

MAX DAILY PROFIT -help


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
tag1 @tag1 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by NicolasNicolas
3 years, 4 months ago.

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