NexusFi: Find Your Edge


Home Menu

 




Net Profit reference


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,188 views
    2. thumb_up 0 thanks given
    3. group 5 followers
    1. forum 2 posts
    2. attach_file 0 attachments




Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now, It is Free
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.

-- Big Mike, Site Administrator

Available coupon codes for premium Elite Membership:
  • If you are a researcher and pay attention to details, you qualify for our 10% discount - "CHARTIST"
  • If you are a veteran or in public/community service, you qualify for 15% discount - "PURPLECHART"
  • If you are 60+ years old, you qualify for our 20% discount - "WISDOM"
  • Discounts are based on the honor system. If we can't trust you to do the right thing, please move along.

(If you already have an account, login at the top of the page)

 
Search this Thread

Net Profit reference

(login for full post details)
  #1 (permalink)
soacm
Bucharest, Romania
 
Posts: 71 since Mar 2022
Thanks Given: 38
Thanks Received: 22

Hi, I am trying to add a condition to a strategy based on the Net Profit taken from the Performance report.
Pseudocode --> Trade only if the Net Profit of today is greater than Net Profit of 4 months ago.
The strategy uses 15min Data1 and Daily Data2, therefore I thought the best way is to use Data2's candles (4 months = 60 daily candles back).
 
Code
var: MyNPT(0,Data2); 
 
if Date <> Date[1] then MyNPT = NetProfit + OpenPositionProfit; // Calculating Net Profit at midnight exchange time. 
 
If MyNPT - MyNTP[60] > 0 then begin 
{insert entry rules} 
end;
MaxBarBack had to be adjusted, but I can't seem to adapt MyNPT to the correct Data2 look back (60 candles), hopefully someone sees what is missing or has a better way to achieve the same result, thank you.

Note: I tried to add "of Data2" in the if statement before the entry rules, but I get a compiler error.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
RangeDisparityMeter Indicator for NT8
Platforms and Indicators
ninzaco snow eagle trading
NinjaTrader
Gabriel Grammatidis
Trading Reviews and Vendors
Can Dump be caught with Algo Trade
Crypto Futures
Time and Price Based Horizontal line Indicator - Request
NinjaTrader
 

(login for full post details)
  #2 (permalink)
timink23
London, UK
 
Posts: 1 since Jul 2022
Thanks Given: 0
Thanks Received: 0

what language is this in?

Reply With Quote
(login for full post details)
  #3 (permalink)
soacm
Bucharest, Romania
 
Posts: 71 since Mar 2022
Thanks Given: 38
Thanks Received: 22



timink23 View Post
what language is this in?

EasyLanguage

Reply With Quote





Last Updated on September 26, 2022


© 2023 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts