NexusFi: Find Your Edge


Home Menu

 





Enter and exit positions within the same bar


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,956 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?
Day 96 Missiles Hit Kuwait and Bahrain: June 15 Peace at …
Prediction Markets & Event Contracts
One Wallet Made $200K in Hours: AP Probes Polymarket Cea …
Prediction Markets & Event Contracts
Friday Update: Markets Now Pricing Fed Rate HIKES as Sta …
Traders Hideout
Penalties in Budapest, Peace Deadline in Tehran: Arsenal …
Prediction Markets & Event Contracts
S&P 500 Holds the Line: No Fast Track for SpaceX, Op …
Stocks and ETFs
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
197 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)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,642


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 X Reply With Quote




Last Updated on March 12, 2015


© 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