How to: Algo order logic to be long above X and short below X?

Spectre2007, that is one awesome set of posts -- a lot of work for the ET crowd.

I would suggest a "Technical Modern Trader & Commodities"* article, straight away. [That would help *me*, anyway, to get beyond those first two posts....to where I missed steps along the way.]



* kinda like "TarKWallMartGet"...
 
Spectre2007, that is one awesome set of posts -- a lot of work for the ET crowd.

I would suggest a "Technical Modern Trader & Commodities"* article, straight away. [That would help *me*, anyway, to get beyond those first two posts....to where I missed steps along the way.]



* kinda like "TarKWallMartGet"...


2340 is not a precise statistical outlier.. so costs were significant at maintaining the straddle. If you look at:

60min.png


significant deviation @ B is around 2333, if you plugged that into ninjatrader the transaction costs come to a tenth. That's why picking a precise statistical outlier is crucial. Deviations from A and B would need to occur first to create 'structure'..

In upwardly trending market, you want to pick the lower outlier 'B' since, in upward market consolidation structures occur at the upper end of the range.
 
Is this a typical execution method? Or have HFT algos sniffed out this protocol and bankrupted suh attempts?. I mean, If I am long above 2400 and short below 2400 for the duration of a month, this portion of my algo will only execute when the market is at the 2400 level. I the market just happens to have a prolonged fluctuation through (continuously hurdling) that 2400 level and I am in and out of my 30 (X) contracts repeatedly, let's say 10 times in 2 minutes, will an HFT pickup on this pattern and then trade against my algo and artificially prolong this fluctuation until I am bankrupt? I.E. crossing back and forth over 2400 until my algo can't buy/sell anymore because my capital is depleted from commissions and tick losses on 30 contracts.

This is my main concern. The logic is simple, long above, short below. The level is selected by me and is not based on support, resistance or any other significant actor. It is simply where the market is when I decide to initiate the trade, usually at the beginning of the month. This is Why I don't fear the market naturally fluctuating over my level (i.e 2400) hundreds of times in one crossing/session because it's improbable, as modeled. However, I do worry about an HT latching onto this simple logic and then deciding to make 1/4 tick profit by ping-ponging my algo back and forth across my level continuously until my algo surrenders from lack of funds.

You could always count the cross overs and stop the algo at a certain number or use the PnL block to stop it if X dollars down.
 
Had to create an account just to say @Spectre2007 you went all out on that, wow.


OP might look into single-crossing property, fixed point theorems, many ways to implement desired trading rule. Try creating an index function with f(.) ∈ {1,0} based on whether your condition is met, and pass the output to your order quantity. Evaluation of a terse expression may be efficient vs evaluation of if/than statements or a while loop. Still have to deal with local jump risk though, GL!
 
strikecosts.png


outright straddle costs 1762.5 plus commissions.. 60 points profit on active position.. 3K = 1238 net.

1238 net plus profit on lifting the short straddle.. .. total profit on both plays .. around 2200 if lifting both to go full cash.
 
Back
Top