SetPercentTrailing: Difference between revisions
From MultiCharts
m
no edit summary
No edit summary |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
Closes out the entire position or the entry if the specified percentage of the maximum profit is lost after the profit has reached the specified value; generates the appropriate [[Stop]] order depending on whether the position is | Closes out the entire position or the entry if the specified percentage of the maximum profit is lost after the profit has reached the specified value; generates the appropriate [[Stop]] order depending on whether the position is Long or Short. | ||
For example, if the specified profit is $100 and the specified percentage is 50, and the profit has reached the maximum of $120, the position will be closed once the profit falls back to $60. | For example, if the specified profit is $100 and the specified percentage is 50, and the profit has reached the maximum of $120, the position will be closed once the profit falls back to $60. | ||
Line 5: | Line 5: | ||
[[SetStopPosition]] and [[SetStopContract]] or [[SetStopShare]] functions determine whether '''SetPercentTrailing''' will be applied to the entire position or each contract or share individually; by default, '''SetPercentTrailing''' is applied to the entire position. | [[SetStopPosition]] and [[SetStopContract]] or [[SetStopShare]] functions determine whether '''SetPercentTrailing''' will be applied to the entire position or each contract or share individually; by default, '''SetPercentTrailing''' is applied to the entire position. | ||
<div style="background-color: # | <div style="background-color: #E3FBE5;margin-bottom:10px;">The SetPercentTrailing function is evaluated intra-bar and not only on close of a bar, and can exit within the same bar as the entry.</div> | ||
== Usage == | == Usage == |