Adjusting the exit depending on time

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
CyTrend
Roundtable Fellow
Roundtable Fellow
Posts: 57
Joined: Mon Oct 25, 2010 5:28 pm

Adjusting the exit depending on time

Post by CyTrend »

Hello was wondering if you could guide me as to how to alter the exit price depending on the time I am in a trade. I was looking a basiclly for a function that would tell me who many days i am in a trade. I can't use instrument.TradeDaysinTrade since it is historic, but I am looking for something similar so i can tell it, if you are in the trade for 3 days do the following etc.

Also was wondering if I could use the entry ordered filled script to do so?
Eventhorizon
Roundtable Knight
Roundtable Knight
Posts: 229
Joined: Thu Jul 08, 2010 2:36 pm
Location: Boulder, CO
Contact:

Post by Eventhorizon »

Use instrument.unitBarsSinceEntry[n] to identify how long you have held a unit "n" if you want to count by bars, or use instrument.unitEntryDate[n] if you want to count by calendar days.
Post Reply