Save data for partial trade with IOG on  [SOLVED]

Questions about MultiCharts and user contributed studies.
tozwp
Posts: 145
Joined: 15 Apr 2011
Has thanked: 16 times
Been thanked: 8 times

Save data for partial trade with IOG on

Postby tozwp » 26 Apr 2014

Having trouble identifying and recording the exit price for a trade that closes out part of a position.
Attempting to print to a file various variables and prices when a partial trade is made. Using Marketposition works when the entire position is closed as it changes from 1 to 0 and I can record the tick when that happens. For a partial position, Marketposition remains at 1. I thought I could use CurrentShares and identify the tick when the number is reduced. What I found was that CurrentShares apparently only changes at the close of the bar, not at each tick. What other identifying characteristic can I use to locate the exact tick when a partial position is closed out?

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Save data for partial trade with IOG on  [SOLVED]

Postby JoshM » 26 Apr 2014

I think the PosTrade* keywords might be of help to you.

tozwp
Posts: 145
Joined: 15 Apr 2011
Has thanked: 16 times
Been thanked: 8 times

Re: Save data for partial trade with IOG on

Postby tozwp » 26 Apr 2014

Thanks much Josh, I will take a look at those. Wasn't aware of them before.

tozwp
Posts: 145
Joined: 15 Apr 2011
Has thanked: 16 times
Been thanked: 8 times

Re: Save data for partial trade with IOG on

Postby tozwp » 26 Apr 2014

Thanks Josh, found a couple of things in that list that are extremely helpful and solved my problem.


Return to “MultiCharts”