NexusFi: Find Your Edge


Home Menu

 





if positionprofit > 1% of trade value?


Discussion in EasyLanguage Programming

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




 
Search this Thread

if positionprofit > 1% of trade value?

(login for full post details)
  #1 (permalink)
 
toddma's Avatar
 toddma 
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
Posts: 53 since Jul 2012
Thanks Given: 14
Thanks Received: 6

Hi - I'm a little bit stuck here.
I have absolute values in my code such as:
if positionprofit > 1000 and...
however, when I run this code on something like pesos or yen I believe it is calculating positionprofit in that currency. So the code will execute when it shouldn't.

How would I make this relative? example:
"if positionprofit > (1% of trade value)"...

Thanks in advance.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
Request for MACD with option to use different MAs for fa …
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
ISO Equity Curve Indicator
NinjaTrader
Trader Dale [email protected] or Scammer Dale
Trading Reviews and Vendors
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
GFIs1 1 DAX trade per day journal
28 thanks
Supertradersams Thread Journal on NQ/MNQ
26 thanks
Tao te Trade: way of the WLD
24 thanks
Just another trading journal: PA, Wyckoff & Trends
12 thanks
1% Risk Journal
11 thanks

(login for full post details)
  #3 (permalink)
 
toddma's Avatar
 toddma 
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
Posts: 53 since Jul 2012
Thanks Given: 14
Thanks Received: 6


Sorry - that question was in reference to Multicharts

Started this thread Reply With Quote
(login for full post details)
  #4 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460

Relatively new to MC myself so don't know most of the in's and out's but one way to convert to percent might be

Value1 = PositionProfit / (AvgEntryPrice * CurrentContracts) * 100;

assuming PositionProfit and AvgEntryPrice are reported in the same currency :-/

Visit my NexusFi Trade Journal Reply With Quote
(login for full post details)
  #5 (permalink)
 
toddma's Avatar
 toddma 
vancouver canada
 
Experience: Intermediate
Platform: multicharts, ninjatrader
Trading: forex
Posts: 53 since Jul 2012
Thanks Given: 14
Thanks Received: 6

That looks like a good solution. I've improvised myself and used:

if positionprofit > InitialCapital*.01 - however, I need to ensure that initialcapital is in the currency that profits are reported in - so I may be trading size 100k but if I'm trading yen then I set the initialcapital @ 8,300,000... this seems* to work... not a great solution though...

Thanks for your thoughts.

Started this thread Reply With Quote





Last Updated on November 23, 2012


© 2024 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