NexusFi: Find Your Edge


Home Menu

 





Enter and exit positions within the same bar


Discussion in EasyLanguage Programming

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




 
Search this Thread

Enter and exit positions within the same bar

  #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?
ZombieSqueeze
Platforms and Indicators
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
What is Markets Chat (markets.chat) real-time trading ro …
Trading Reviews and Vendors
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #3 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627


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 - Downloads - Top
no new posts