1) How does one pass the current market position to the userdefinedmethod? I see from the example that you include the data type and the variable that you need passed on in the brackets, but don't know how this works with market position. For example, if the userdefined method needs to know that you are short to evaluate a condition, how do I pass on from the strategy that uses the userdefinedmethod, whether or not I am short?
2) Is there any way to isolate an entire chunk of code into userdefinedmethod? For example, if I have a whole bunch of stratgies that have the same trailing stop is it possible to have the entire conditional statement for the stop contained in the userdefinedmethod to be called when the system is long or short? (as opposed to letting the userdefinedmethod evaluate the conditions, return a true or false and having the main strategy submit the closing stop order) & if so, an example would be greatly appreciated.
Thank you very much in advance.
---
Comment