|
Orlando FL
Experience: Intermediate
Platform: MultiCharts, Ninja
Trading: Emini ES
Posts: 101 since May 2019
Thanks Given: 8
Thanks Received: 12
|
So I've been programming with EASY/POWERlanguage for about 13 years now. And I'm not too proud to say that I'm not a "know-it-all" nor do I pretend to know everything there is to know. With that said, I'm in the process of coding a strategy that adds contracts and takes off contracts during a trade. While thinking of how to do this, I decided to actually look up the keyword "SELL" in the reference guide. In there, I found the following example:
Completely exit from the long position established by the entry labeled "Original
Entry", at Market price on open of next bar:
Sell From Entry("Original Entry")Next Bar At Open;
Sell 10 shares of the long position established by the entry labeled "Original
Entry", at Market price on open of next bar:
Sell Entry("Original Entry")10 Shares Next Bar At Market;
I found this useful but perplexing at the same time. So I must ask the community for clarity. Let's say I put in code that will Buy 20 contracts once the signal tests are met and I call that trade "Original Entry" Then, while that position is open, the strat identifies another condition and buys another 10 contracts that is labeled "Second Position". So now there is a total of 30 contracts open (20 under the label "Original Entry" and 10 under the label "Second Position".) Is MC's example in the reference guide saying that if I want to close all or some of only the contracts in the "Original Entry" position, it will do it with the examples shown? Please confirm.
Also, if the strategy has used this label in prior positions but are now closed out, is this a problem? In other words, can I assume it will only consider the open trades and nothing already closed out?
Thanks for the help.
|