+1 888 340 6572
MultiCharts Project Management
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
bug_report_small.png
Open Bug report MC-2660

SetProfitTarget_pt vs. SetProfitTarget operate differently

action_vote_minus_faded.png
1
Votes
action_vote_plus_faded.png
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
Description

I have a 2 position trade on the S&P emini which has a $12.50 tick value. When I use SetProfitTarget_pt set to 20 I get a different result than if I use SetProfitTarget set to 250. Both are set to PositionBasis True. SetProfitTarget_pt will close the trade when the trade = 20 ticks per position, or $250 for each position, total $500. SetProfitTarget will close the trade when the trade = $125 per position, or total $250. I Think they should operate in a similar way.

So long as the position size is greater than 1 the issue surfaces.

Steps to reproduce this issue
  1. Create a chart on S&P mini future contract (issue is on all instruments)
  2. Apply any strategy
  3. Set strategy properties to allow up to 50 positions
  4. Using SetProfitTarget_pt in the ProfitTarget Strategy and set the profit target to an amount high enough to cause multiple positions in a trade.
  5. Note the input setting
  6. As an example, if the input setting was 20, then multiply 20 X the tick value. In the case of the S&P emini it is $12.50 per tick X 20 which equals $250.
  7. Using SetProfitTarget in the ProfitTarget Strategy, set profit target to $250.
  8. Compare the results.

When the trade closes the multiple positions at one time using SetProfitTarget, equals per trade profit
When the trade closes the multiple positions at one time, SetProfitTarget_pt equals profit for each position in the trade

Comments (2)
#1
user-offline.png  MultiCharts Support (MultiCharts)
Aug 14, 2020 - 08:48
Hello,

SetProfitTarget_pt generates an order with a specified tick offset from the entry price.

Below is an example for ES: tick = MinMove / PriceScale = 0.25 tickValue = MinMove / PriceScale * bigpointvalue = 12.5

If you have two entries for ES, let's suppose these are two Buy orders 1 contract each, so you have a position Long 2.

1. If you set SetProfitTarget_pt(20) in the mode SetStopPosition, this means that the position will be closed at the 20 ticks offset from the entry price. In this case, the price of a Limit order that will close the position will be calculated this way: AvgEntryPrice + 20ticks = AvgEntryPrice + 20 * 0.25 = AvgEntryPrice + 5 (this is the price of the order on the chart) The profit will be no less than 20ticks * 2contract = 20 * 12.5 * 2 = $500.

2. If you set SetProfitTarget(250) in the mode SetStopPosition, this means that the profit $250 will be fixed from Long 2 position. In this case, the price of the Limit order that will close the position will be calculated this way: AvgEntryPrice + ( 250 / tickValue / 2) = AvgEntryPrice + ( 250 /12.5 / 2 ) = AvgEntryPrice + ( 10ticks ) = AvgEntryPrice + 2.5 (this is the order price on the chart) The profit will be no less than $250.
#2
user-offline.png  db (beck donald)
Sep 20, 2020 - 06:16

I understand how it works. It was my suggestion that a 2 new keywords be created so that a profit strategy could be programmed to same results no matter if you select profit targets based on points or dollar amounts.

S&P mini at $12.50 per tick
Current options
2 point profit target X 2 positions = $50.00 (profit target in points will change the dollar result based on the number of positions in a trade)
$25 profit target X 2 positions = $25.00 (profit target in dollars for the whole trade, number of positions does not change the profit target)

Suggest new keywords so that the following programming could be done.
2 point profit target X 2 positions = $25.00 (allows profit target for the whole trade. More positions will not change dollar result)
$25 profit target X 2 positions = $50.00 (allows profit target for each position in a trade based on dollars, more positions increase the dollar result)

History
Issue basics
  • Type of issue
    Bug report
  • Category
    Not determined
  • Targeted for
    Not determined
  • Status
    Under Review
  • Priority
    Not determined
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
  • Reproducability
    Not determined
Attachments (0)
There is nothing attached to this issue
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates