i'm using some of this code : https://ninjatraderecosystem.com/use...lingstop_101b/ as a template with a few modifications of my own
but i'm running into some trouble and can't solve it,
most of the time all is well, except when the trend is going down, and i'm having my strategy re-entering an entry (while having another entry open), and one of the entries hit stop-loss, then when it entering again at a lower price (while i'm still having another open entry), the stoploss and trailing stop are calculated by the Position.AveragePrice (to remind you when the trend is down) , the stoploss is way above the lower price so it never hit it.
my question is, how would i change the calculation by the last position price and not the average?
thanks for anyone who can help
Comment