NexusFi: Find Your Edge


Home Menu

 





trying to code ORB tradestation


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
w4rri0r
world's citizen
 
Posts: 45 since Oct 2015
Thanks Given: 10
Thanks Received: 7

Hi,
can someone help me with a simple code? I've tried but it's really not my work......can't figure out how it work....
I'm trying to code a simple breakout strategy:
> buy long (limit) if price goes above 1rst minute candle + 0.01 cent
> put a stop at 1rst minute low - 0.01 cent
> position = distance from 1rst minute high and low / $fixed dollar amount

then i will try to code some better money management rules, like trailing stop or move stop at breakeven > taking profits (scaling out etc etc)

Please, someone can point me in the right direction?

thanks!


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
CFTC Opens First COT Report Review in 20 Years -- Asks W …
Traders Hideout
Roland Garros Final Day: $3M on Zverev at 80.5% -- Leban …
Prediction Markets & Event Contracts
Weekend Update: First Qatari LNG Transit Attempted -- IR …
Traders Hideout
Warsh Rate Hike at 40%, Iran June 15 Expires Tonight at …
Prediction Markets & Event Contracts
June 15 Peace Odds Surge From 3.6% to 12.25% After Trump …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
196 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)
 
GoldenRatio's Avatar
 GoldenRatio 
Philadelphia, PA
 
Experience: Advanced
Platform: Matlab, TradeStation
Trading: Stocks
Posts: 211 since Aug 2012
Thanks Given: 5,192
Thanks Received: 296



w4rri0r View Post
Hi,
can someone help me with a simple code? I've tried but it's really not my work......can't figure out how it work....
I'm trying to code a simple breakout strategy:
> buy long (limit) if price goes above 1rst minute candle + 0.01 cent
> put a stop at 1rst minute low - 0.01 cent
> position = distance from 1rst minute high and low / $fixed dollar amount

then i will try to code some better money management rules, like trailing stop or move stop at breakeven > taking profits (scaling out etc etc)

Please, someone can point me in the right direction?

thanks!

@w4rri0r You will have better success if you post your sample code so that others can review it and point out any issues.


Reply With Quote
  #4 (permalink)
w4rri0r
world's citizen
 
Posts: 45 since Oct 2015
Thanks Given: 10
Thanks Received: 7


GoldenRatio View Post
@w4rri0r You will have better success if you post your sample code so that others can review it and point out an issues.

Hi @Golden,

i need to insert some money management in this code:
 
Code
var: 
    FirstBarHi( 0 ), 
    FirstBarLo( 0 ); 
 
If CurrentSession(0) <> CurrentSession(0)[1] then begin         
FirstBarHi = High; 
FirstBarLo = Low;    
end; 
 
if Time > 0930 and Time <= 0935 then begin  // allow five min. after the open to break below or above the first min. bar of the day 
Buy next bar at  FirstBarHi + .01 stop; 
Sell short next bar at FirstBarLo - .01 stop; 
end; 
 
Sell next bar at FirstBarLo - .01 stop; 
BuyToCover next bar at FirstBarHi + .01 stop; 
  
setexitonclose;
1) what i'd like to code is a position size like --> distance from low to high (in points) / fixed dollar amount
2) take profit after x conditions (like a % move in the right direction or increase in volatility) and move stop to breakeven
3) move stop to breakeven after x conditions (time etc etc)


Reply With Quote
Thanked by:




Last Updated on November 13, 2016


© 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