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 -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I am trying to insert some position management in my strategy, a very simple one actually: I want to add 1 contract to my existing position if the open profit of the existing contract reaches a certain level.
This should be quite easy, but I don't know why this simple instruction is not doing what it should be. I have already checked through the print log that all the condition all TRUE in some candles, but nothing happens:
This is the print log where I print all my adding conditions, as you see there are the 3 candles of 10:00, 11:00 and 12:00 that satisfy the conditions...but nothing happens
I also checked the properties of the strategy to see if there was any limitation, but max contract number is actually 65000.
Can you help answer these questions from other members on NexusFi?
Multicharts requires the user to specifically allow more than one entry in the same direction under the general strategy properties. It will only take one entry by default.
The position limits settings are located on the "Properties" tab of the "Strategy Properties" dialog directly above the "maximum shares/contracts per position" settings that you have already checked.
Multicharts requires the user to specifically allow more than one entry in the same direction under the general strategy properties. It will only take one entry by default.
The position limits settings are located on the "Properties" tab of the "Strategy Properties" dialog directly above the "maximum shares/contracts per position" settings that you have already checked.
Regards,
ABCTG
aaah, thanks ABCTG...I knew it was something in the Properties but I didn't see until you told me!!! all good now
I am trying to insert some position management in my strategy, a very simple one actually: I want to add 1 contract to my existing position if the open profit of the existing contract reaches a certain level.
This should be quite easy, but I don't know why this simple instruction is not doing what it should be. I have already checked through the print log that all the condition all TRUE in some candles, but nothing happens:
if mp=1
and OpenEntryContracts=1
and openpositionprofit>200
and t<1300
then buy("L-Add") 1 contract next bar at open;
if mp=-1
and OpenEntryContracts=1
and openpositionprofit>200
and t<1300
then sellshort("S-Add") 1 contract next bar at open;
This is the print log where I print all my adding conditions, as you see there are the 3 candles of 10:00, 11:00 and 12:00 that satisfy the conditions...but nothing happens
I also checked the properties of the strategy to see if there was any limitation, but max contract number is actually 65000.
Could you debug this using a 'paintbar' (put a " * " above the bar or something) for each potential trade? This would give you the positive indication the code is working and it's a platform limitation vs some kind of code issue. My typical go-to for debugging something like this to make the code paint something on the bar to show that the code is right and then move forward w/ trade execution from there, when I can.