|
Vangelis M.
2014-05-28 21:29:50
|
|
Hello,
When I am working on various AMM scripts, I often use the same logic. So I place them in functions.
I usually place those functions under the "Global" Tab. Is that the best place to define a function? If yes, can I avoid passing Portfolio, Data, Orders and other objects to the function?
An example: I created a function that re-balances to target percent of equity. In the Globals Tab I had to pass all these objects:
public void orderTargetPercent(MMPortfolio Portfolio, MMData Data,MMOnEndPeriod Functions,MMOrders Orders, string symbol, double percent)
{...
}
Is this a good way to do this?
Thanks
|
|