checking reason exit position, and benefits ??

Questions about MultiCharts and user contributed studies.
skan

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: 7743
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: checking reason exit position, and benefits ??

Postby TJ » 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
To start...

look up sections begin with "Strategy"

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

skan

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: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: checking reason exit position, and benefits ??

Postby JoshM » 19 Aug 2012

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.


Return to “MultiCharts”