Georgia
Experience: Intermediate
Platform: Ninja
Broker: AMP/CQG
Trading: ZN, ES, FGBL, FESX
Posts: 133 since Jul 2009
Thanks Given: 874
Thanks Received: 113
|
Hi,
We're trying to write a strategy that would allow us to use a similar algorithm found in the ATM Strategy but with the ability to backtest on historical data. Writing the code (i.e. C#) is not an issue, what's an issue is understanding how it all should tie in. Here's what I would like to have:
1) If some condition is met then go long. Set some variable to the low and high value to exit. For example -2 ticks to cut our loss and +4 to make a profit.
a) If already long and we reached our profit target we should raise the profit bar and change the loss bar. For example -1 tick for a loss and +2 for a profit.
b) If already long but below or above these limits we should exit the long.
We would have something similar for the short part. The problem we're having is figuring out where to put all this logic (OnBarUpdate or OnExecution) and what methods we should use for enter/exit trades. There are 4 variations only on exiting the long alone (ExitLong, ExitLongLimit, ExitStop, ExitStopLimit). Which one do we need to use?
The way I understand the system so far, we should be able to control the whole process in bar-by-bar. Ideally, from my point of view, we should decide manually when to enter or exit a trade, without relying on the xxxLimit magic
I realize this is all vague, and it's because we're missing many pieces of the puzzle. Any help is appreciated.
|