Check last trade PL - futures io
futures io



Check last trade PL


Discussion in EasyLanguage Programming

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




Welcome to futures io: the largest futures trading community on the planet, with well over 150,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

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

 
Search this Thread
 

Check last trade PL

(login for full post details)
  #1 (permalink)
 bchip 
Torino, Italy
 
Experience: Advanced
Platform: TradeStation
Trading: ES,YM,CL,GC
 
Posts: 132 since Sep 2017
Thanks: 160 given, 115 received

Hi

Is it possible to check if the last trade was a winner or loser?
Is there any code for this?

E.g. if PrevTradePL < 0 then BuyCtx = 1
else BuyCtx = 2

Thank you

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
Market on Close data within IB
Platforms and Indicators
in depth understanding of last, bid, and ask volume in c …
NinjaTrader
NT8 Order Management Strategy
The Elite Circle
help with take profit several targets
TradeStation
Multi Time Frame High/Low/Median levels
NinjaTrader
 
 
(login for full post details)
  #2 (permalink)
 vmodus 
Legendary Systematic Algo Trader
Somewhere, Delaware, USA
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
 
vmodus's Avatar
 
Posts: 1,263 since Feb 2017
Thanks: 2,958 given, 2,841 received

You probably want to use: PositionProfit
From the EasyLanguage dictionary:
PositionProfit (Reserved Word)

Returns the current gain or loss of the specified position..

PositionProfit(Num);

Num is a numeric expression representing the number of positions ago (up to a maximum of ten).

Remarks

This function can only be used in the evaluation of strategies. It does not require an input, however, by using the input Num, you can obtain the specified value from a previous position, up to ten positions ago.

Example

PositionProfit(3) returns a value of -1.00 if the third most recent position on a chart had a loss of 1.00.

~vmodus

Enjoy everything!
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to vmodus for this post:
 
(login for full post details)
  #3 (permalink)
 bchip 
Torino, Italy
 
Experience: Advanced
Platform: TradeStation
Trading: ES,YM,CL,GC
 
Posts: 132 since Sep 2017
Thanks: 160 given, 115 received



vmodus View Post
You probably want to use: PositionProfit
From the EasyLanguage dictionary:
PositionProfit[/B] (Reserved Word)

Thank you very much

Started this thread Reply With Quote
The following user says Thank You to bchip for this post:


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Check last trade PL


Last Updated on June 5, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2023 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
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.
no new posts