NexusFi: Find Your Edge


Home Menu

 





How do I put a stop limit order below instead of a stop order?


Discussion in TradeStation

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




 
Search this Thread
  #1 (permalink)
qq504756010
San Jose
 
Posts: 1 since Dec 2020
Thanks Given: 1
Thanks Received: 0

{ Search Tag: WA-New High LE }

{
This strategy buys on a new high for the chart or for the specified calendar
period - day, week, month or year.

The IntrabarOrderGeneration attribute is set to false in this strategy because
strategy calculations depend on end-of-bar prices. Specifically, in this strategy
the end-of-bar high is used.
}

[IntrabarOrderGeneration = false]

inputs:
int PeriodType( 1 ) [DisplayName = "PeriodType", ToolTip =
"Enter the time period for which the code is looking for a new High. Enter 1 for chart, 2 for day, 3 for week, 4 for month, 5 for year."];

variables:
int BT( BarType ),
bool LastBarOfPeriod( false ),
{
HighestHi is initialized to a large positive value to ensure that if a
calendar period is specified, the first such period on the chart is ignored
because it may be incomplete
}
double HighestHi( 1000000 ),
bool IsDailyBarOrShorter( false ),
bool IsWeeklyBarOrShorter( false ),
bool IsMonthBarOrShorter( false ),
bool NextBarIsNewDay( false ),
bool NextBarIsNewWeek( false ),
bool NextBarIsNewMonth( false ),
bool NextBarIsNewYear( false );

if CurrentBar = 1 then
begin
IsDailyBarOrShorter = BT <= 2 or BT = 14;
IsWeeklyBarOrShorter = BT <= 3 or BT = 14;
IsMonthBarOrShorter = BT <= 4 or BT = 14;
end;

NextBarIsNewDay = Date <> Date next bar;
NextBarIsNewWeek = DayOfWeek( Date) > DayOfWeek( Date next bar );
NextBarIsNewMonth = Month( Date ) <> Month( Date next bar );
NextBarIsNewYear = Year( Date ) <> Year( Date next bar );

if ( PeriodType = 2 and IsDailyBarOrShorter and NextBarIsNewDay )
or ( PeriodType = 3 and IsWeeklyBarOrShorter and NextBarIsNewWeek )
or ( PeriodType = 4 and IsMonthBarOrShorter and NextBarIsNewMonth )
or ( PeriodType = 5 and IsMonthBarOrShorter and NextBarIsNewYear )
then
LastBarOfPeriod = true
else
LastBarOfPeriod = false;

if ( CurrentBar = 1 and ( PeriodType <= 1 or PeriodType > 5 ) )
or LastBarOfPeriod[1]
or High > HighestHi
then
HighestHi = High;

if LastBarOfPeriod = false then
Buy( !( "NewHi" ) ) next at bar at HighestHi + 1 point stop;


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Strike Pause Holds, Oil Erases Monday Spike -- May CPI W …
Traders Hideout
Election Sunday Resolves: Peru Heads to Runoff at 42pct, …
Prediction Markets & Event Contracts
CME Cuts Precious Metals Margins Up to 21% Starting Toda …
Commodities
Post-Summit Market Verdict: ES -1%, NQ -1.5%, 10-Year Yi …
Traders Hideout
Rubios Good News Within Hours and the 30-Day Math: Why H …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
 
vmodus's Avatar
 vmodus 
Somewhere, Delaware, USA
Systematic Algo Trader
 
Experience: Intermediate
Platform: MultiCharts
Broker: Barchart.com
Trading: Everything, it all tastes like chicken
Posts: 1,270 since Feb 2017
Thanks Given: 2,960
Thanks Received: 2,856

You cannot place a stop limit order in standard EasyLanguage.

https://community.tradestation.com/Discussions/Topic.aspx?Topic_ID=103239

You can use the OrderTicket functionality or OOEL, but that is a little bit beyond the scope of what I can answer here. Go check out the community forums at TradeStation for more assistance on this.


~vmodus

Enjoy everything!
Follow me on X Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on December 17, 2020


© 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