MAX DAILY PROFIT -help

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #216538 quote
    tag1
    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
    Nicolas
    Keymaster
    Master

    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.

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 Nicolas
2 years, 8 months ago.

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