checking reason exit position, and benefits ??

Questions about MultiCharts and user contributed studies.
skan
Posts: 36
Joined: 15 Jul 2010

checking reason exit position, and benefits ??

Postby skan » 19 Aug 2012

Hello

I'm writing an easylanguage code and ...

I'm outside the market and I want to check...

a) If my last trade was positive or negative (benefits).
b) If I exit my last position because of a "stop loss"



What functions do I need to use?
a) positionprofit(1)>=0 ?
b) ????

regards

User avatar
TJ
Posts: 6584
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 970 times
Been thanked: 1907 times

Re: checking reason exit position, and benefits ??

Postby TJ » 19 Aug 2012

skan wrote:Hello

I'm writing an easylanguage code and ...

I'm outside the market and I want to check...

a) If my last trade was positive or negative (benefits).
b) If I exit my last position because of a "stop loss"



What functions do I need to use?
a) positionprofit(1)>=0 ?
b) ????

regards


To start...

look up sections begin with "Strategy"

https://www.multicharts.com/trading-soft ... _Reference

skan
Posts: 36
Joined: 15 Jul 2010

Re: checking reason exit position, and benefits ??

Postby skan » 19 Aug 2012

Hi

There I can find a list of many functions but I don't know the proper way to do what I need, above all, the way to check what was the reason I exit the market last trade.

I've found the word "PosTradeEntryCategory" at your link but it doesn't appear in the reference document EL_FunctionsAndReservedWords_Ref.pdf

User avatar
JoshM
Posts: 2089
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1525 times
Been thanked: 1485 times
Contact:

Re: checking reason exit position, and benefits ??

Postby JoshM » 19 Aug 2012

skan wrote:There I can find a list of many functions but I don't know the proper way to do what I need, above all, the way to check what was the reason I exit the market last trade.

I've found the word "PosTradeEntryCategory" at your link but it doesn't appear in the reference document EL_FunctionsAndReservedWords_Ref.pdf

There's an article on PosTradeEntryCategory on the wiki, but if you want to know the 'reason' why the last trade was exited, I think PosTradeExitName is more suitable (if you use descriptive order names).

Otherwise you could track this in your PowerLanguage code directly.
These users thanked the author JoshM for the post:
Andrew MultiCharts


Return to “MultiCharts”