Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
So I'm trying to create a strategy that scales in and out. I've managed to figure out how to partially close out a position. However, I'm struggling with the code to scale in. I was under the impression that you could simple use the Buy or SellShort command and use different labels for the various positions. however, it seems that these orders are being ignored.
I did find the reserve word CHANGEMARKETPOSITION ... is that the way to do it? The problem I have is that when I read the description in the MC keyword reference, the example used is
Example
If MarketPosition = 2 then ChangeMarketPosition (-2,100,"LX")
Will place close order with the name "LX" and the price 100 if current marketposition =2
I thought Marketposition could only be 1, 0, or -1????
Please chime in. Thanks
Can you help answer these questions from other members on NexusFi?
the reserved words buy and sellshort work fine for pyramiding. However, by default Multicharts will only take one entry in the same direction and need to adjust the position limit settings on "Properties" tab of the "Strategy Properties" dialog.
it is used for changing the market position on the chart without actually issuing orders. Take a look at the built-in "!From Broker To Strategy MP Synchronizer!" for an example of synchronizing the
chart position to the broker position.
Thanks ABC... sorry to keep leaning on you, but I have another question; maybe two
So, I started another thread about changing names on trades. Can you confirm my belief that CME futures trades are closed on a FIFO (First In First Out) basis? I believe they are and if so, this can create a bit of a problem programming continual scaling in and out. That would be question 1.
Here's question 2: Let's assume for a minute that I'm right about the FIFO issue. Does it really matter coding wise? Let me throw a scenario at you. So let's assume I go long 4 different times in the ES at 5 contracts each time and now I am long 20 ES. I call them L1 - L4. If I close out 10 of those contracts, but tell it to close out L3 and L4, will that be a problem? I'm hoping it's not and that in reality, the contracts in L1 and L2 will be closed as they were first in. Let me know your thoughts. Thanks again for all your help.
based on your example it appears you are mixing the internal strategy trades (i.e. what the strategy "sees") and what happens at the exchange.
If you close out the last filled strategy trade first within your strategy, then the strategy will see this and be aware of that, even if the exchange filled you on a FIFO basis.
Not sure I understand what you are saying. Are you saying that 1) I am correct that in reality, the exchange will close out contracts on a FIFO? and 2) that the strategy will end up closing all the contracts since it didn't close out L3 & L4? Not sure I understand what you're saying when you said "then the strategy will see this and be aware of that".
my point is that it might not matter for your strategy development if the exchange fills your contracts on a FIFO basis. You can tie your exits to respective strategy entries and this is what the strategy detects and is aware of.