Let's say hypothetically that I'm currently long three shares of AAPL. One share was bought at $60, one share was bought at $65, and one share was bought at $70. Thus, my average entry price is $65.
I then set a stop loss order using:
Code: Select all
SetStopShare;
SetStopLoss(10);
My understanding that this will generate a single stop order at my broker for all three shares. Is this correct? I.e., it will set a stop loss at my broker for all three shares for $55, which is $10 less than the average entry price of $65. If the stop is hit, then all three shares are sold together (for a total loss of $30), and I'll be flat.
I'd prefer instead to have a separate stop loss for each entry order. E.g., if I want a $10 stop loss per share, then there should be a first stop order for one share at $60 (for the $70 entry), a second stop order at $55 (for the $65 entry), and a third stop order at $50 (for the $60 entry).
Is there any way to do this efficiently using MultiCharts? I'm guessing that I could code this manually by iterating through the open orders, and then use "sell from entry ("...") at [stop price] stop". However, this seems like a chore. Is there any easier way to do this?