NexusFi: Find Your Edge


Home Menu

 





Contract Rollover: Adopt Real World Position and manage per previous position entry


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one leinster with 1 posts (0 thanks)
    2. looks_two veeyem with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 RM99 with 1 posts (0 thanks)
    1. trending_up 4,025 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
 RM99 
Austin, TX
 
Experience: Advanced
Platform: TradeStation
Trading: Futures
Posts: 838 since Mar 2011
Thanks Given: 124
Thanks Received: 705

Here's the issue.

I'm starting to get into inter-day trading of commodity futures.

I'm using automated trading strategies (ATS).

I need a clever way to manually (or automatically) exit a current position if the current contract relinquishes volume superiority to the new contract.

Once that happens, I will manually re-enter the position on the new contract. On the settings tab, I can instruct TS to "adopt real world position" and manage the order from that point on.

The only problem is that the previous position that was prematurely exited (due to rollover) had an entry point and a trade duration history that's lost in this swap over.

Most of my strategies utilize multiple exit orders....some of which feature activation levels/thresholds.

In essence..."If maxpositionprofit > threshold, then begin...."

Once I manually enter the new position and enable the ATS, it will adopt and manage the new position (on the new contract). However, I'd like it to manage the position with the old entry point to reference so that some of these activation criteria for exit features are in play. (i.e. if my old position was up 150 ticks, and I have a trailing stop that activates at 100 ticks, then I'd like my new position on the new contract to immediately adopt a trailing stop, not wait for the new strategy to reach the threshold again).

So, issue A) Identifying newer contract volume superiority and liquidating current position.

Issue B) Referencing the "old" position entry point to manage the trade from that point on.

Because I'm manually entering the new position (on a new chart/symbol) it's not unreasonable to have to manually enter the old entry price into an input field.

The code would have to be boolean, where if no entry price was entered into the input field, the ATS would operate normally as if every trade were a fresh/new entry.

Any ideas would be a great help.

As it stands now, if I'm trading with extended positions, I have to manually struggle through the rollover trades until the trade is complete and out of the way then start the ATS fresh. That's not such a big deal, except my exit management tends to be pretty complex and CL can move so fast it's tough to keep up with calculations....

Automating will help to ensure that my live-forward performance more closely matches my strategy performance during continuous symbol backtests.


"A dumb man never learns. A smart man learns from his own failure and success. But a wise man learns from the failure and success of others."
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Iran Update May 8: Still Reviewing MOU, Demands Reparati …
Traders Hideout
ATFX Suspends Prop Trading Unit ATFunded -- Full Review …
Funded Trading Evaluation Firms
Election Sunday Resolves: Peru Heads to Runoff at 42pct, …
Prediction Markets & Event Contracts
Powell in 48 Hours: Word Markets Give 78% on Inflation, …
Prediction Markets & Event Contracts
UMA Votes Tonight: Polymarkets $80M Strategy Bitcoin Bat …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
196 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
BERN ALGOS algo trading journal
8 thanks
Volume Indicators
8 thanks
  #3 (permalink)
 veeyem 
Singapore Singapore
 
Experience: Intermediate
Platform: TradeStation
Broker: TS
Trading: GOLD
Posts: 13 since Dec 2011
Thanks Given: 15
Thanks Received: 1


I am facing the same. Did you managed to find a solution. If so, appreciate if you can share the same. Thx in advance.


Reply With Quote
  #4 (permalink)
 leinster 
Brussels / Dublin
 
Experience: Intermediate
Platform: ninjatrader
Trading: Stdev + 2
Posts: 468 since Jun 2010
Thanks Given: 844
Thanks Received: 595

I have the exact same issue and havent had a definitive thought on how to do it!

Anyone have any ideas on how to fix it to be best.

As if the new contract is involved the entry will be slightly different to the original 1.

And if your using dynamic stops such as a chandelier etc then the calculations are off.

Im thinking i should just trim the minimum num of bar's setting on the new rollover date to try get something that is reasonably close....


Reply With Quote




Last Updated on May 30, 2012


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts