SetProfitTarget_pt vs. SetProfitTarget issue

Questions about MultiCharts and user contributed studies.
beck donald
Posts: 199
Joined: 25 Jan 2008
Has thanked: 2 times
Been thanked: 7 times

SetProfitTarget_pt vs. SetProfitTarget issue

Postby beck donald » 13 Jul 2020

If 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. Am I missing something?

As a work-a-round, I have tried to modify the ProfitTarget that uses SetProfitTarget by using currententried or currentcontracts. The results still don't match. Thinking about trying to modify ProfitTarget that uses SetProfitTarget_pt, by having the input value tie into the point value.

Thanks

User avatar
Vlada MultiCharts
Posts: 293
Joined: 22 Apr 2020
Has thanked: 8 times
Been thanked: 76 times

Re: SetProfitTarget_pt vs. SetProfitTarget issue

Postby Vlada MultiCharts » 14 Aug 2020

Hello Donald,

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.


Return to “MultiCharts”