NexusFi: Find Your Edge


Home Menu

 





Enter and exit positions within the same bar


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,589 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
mandelmus
Dallas, TX
 
Posts: 8 since Jun 2011
Thanks Given: 2
Thanks Received: 3

I'm trying to test one of TRO's intraday strategies where you enter long at the ( daily open + 0.10 ) and exit that long position at either ( daily open + 0.20 ) for a profit or at either a stop loss at the ( entry price - 0.30 ) or at the (end of day). Only one trade is allowed per day. Since the entry and exits can occur within the same bar, I'm not sure of the best way to code this.


Also, what's the best way to configure the following settings for use with this strategy?
> [IntrabarOrderGeneration = TRUE/FALSE]
> IntrabarPersist variables
> Format Strategy > Calculation > Enable intrabar order generation and calculation
> Strategy Properties > General > Back-testing resolution > Use Look-Inside-Bar Back-testing > tick
> Strategy Properties > Backtesting > Fill entire order when trade ...
> Strategy Properties > Automation > Strategy will fill non-historical orders based on price activity

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Creating global variables for Ninjatrader
Traders Hideout
How to: Multi Time-Frame Volume Profile?
NinjaTrader
RSI Values Scale
NinjaTrader
DOM in QTrader vs Bookmap
Platforms and Indicators
What a Cool Draw/Markup Tool!
Traders Hideout
 
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,441 since Apr 2013
Thanks Given: 491
Thanks Received: 1,634


mandelmus,

for the programming you should use intrabar order generation and intrabarpersist for the variables that need it.
For backtesting and especially with intrabar order generation my advise would be to use the Bar Magnifier with the highest resolution possible.

Regards,

ABCTG

Follow me on Twitter Reply With Quote




Last Updated on March 12, 2015


© 2024 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 - Privacy Policy - Sitemap - Downloads - Top
no new posts