I'm new at programing and was wondering whether someone can guide me to a few resources . . .
I have an indicator that will tell me where I want to enter into a position and in which direction.
My question is 2-fold . . .
First, if I already had an ATM strategy saved for manual trading (where I place my trades myself and then let the ATM strategy close me out of my positions), is there anyway I can reference those same ATM strategies in Ninjascript in my automated strategy? Is there any sample code I can review?
Second, if I have to code the ATM into the strategy, then can someone point me to sample code that will handle ALL aspects of the following scenario:
Once direction and entry price is established:
1. Place order to go (long/short) 3 contracts at entry price
2. When order is filled place OCO: target 1 = 15ticks, target 2 = 30 ticks, target 3 = 100 ticks and stoploss = 15ticks
3. After price goes 15ticks in my favor (target 1 not necessarily filled), move stop on outstanding contracts to 3ticks
4. After price goes 30ticks in my favor (target 2 not necessarily filled), move stop on outstanding contracts to breakeven.
5. After price reaches 50ticks (both target 1 and 2 have been filled), then trail stop on target 3 to 30ticks from current price every 10ticks.
Thanks for your help
Comment