NexusFi: Find Your Edge


Home Menu

 





What is preventing the strategy to add to my existing position?


Discussion in MultiCharts

Updated
    1. trending_up 66 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

What is preventing the strategy to add to my existing position?

  #1 (permalink)
eros1973ms
florence
 
Posts: 27 since Oct 2011
Thanks Given: 3
Thanks Received: 6

Hi all,

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:

 
Code
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

 
Code
print(d," ",t," ",mp," ",openpositionprofit," ",OpenEntryContracts);

Quoting 
1240402.00 700.00 0.00 0.00 0.00 ---> strategy is flat
1240402.00 800.00 -1.00 129.30 1.00 ---> this is the first entry of the strategy
1240402.00 900.00 -1.00 296.30 1.00 ---> starting from here the strategy should add 1 contract to existing position
1240402.00 1000.00 -1.00 371.80 1.00
1240402.00 1100.00 -1.00 337.80 1.00
1240402.00 1200.00 -1.00 224.80 1.00
1240402.00 1300.00 -1.00 249.30 1.00
1240402.00 1400.00 -1.00 248.30 1.00

I also checked the properties of the strategy to see if there was any limitation, but max contract number is actually 65000.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
 
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

eros1973ms,

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


eros1973ms View Post
Hi all,

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:

 
Code
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

 
Code
print(d," ",t," ",mp," ",openpositionprofit," ",OpenEntryContracts);

I also checked the properties of the strategy to see if there was any limitation, but max contract number is actually 65000.


Follow me on Twitter Reply With Quote
Thanked by:
  #3 (permalink)
eros1973ms
florence
 
Posts: 27 since Oct 2011
Thanks Given: 3
Thanks Received: 6



ABCTG View Post
eros1973ms,

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

Reply With Quote




Last Updated on April 3, 2024


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts