NexusFi: Find Your Edge


Home Menu

 





Breakout Of 30 minute Bar at 1200 Lunch


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one Joe50 with 5 posts (1 thanks)
    2. looks_two edgefirst with 1 posts (0 thanks)
    3. looks_3 GoldenRatio with 1 posts (2 thanks)
    4. looks_4 SidewalkAerobics with 1 posts (1 thanks)
      Best Posters
    1. looks_one GoldenRatio with 2 thanks per post
    2. looks_two ABCTG with 1 thanks per post
    3. looks_3 SidewalkAerobics with 1 thanks per post
    4. looks_4 Joe50 with 0.2 thanks per post
    1. trending_up 1,375 views
    2. thumb_up 5 thanks given
    3. group 4 followers
    1. forum 9 posts
    2. attach_file 0 attachments




 
Search this Thread

Breakout Of 30 minute Bar at 1200 Lunch

  #1 (permalink)
Joe50
HONOLULU
 
Posts: 23 since Feb 2019
Thanks Given: 6
Thanks Received: 3

Hello and thankyou for reading this,


I am trying to create the script in Tradestation for trading the 1200 noon bar, so if the price exceeds the high by .01 points or low .01 points a trade is triggered.

I have tried many scripts which reference a time but they are not using the high and low of the 1200 bar unless the trigger time is 1230. If the time is 1330 and there is a breakout it references the 1300 bar not the 1200 bar. What I am trying to do is use the 1200 bar as a static bar so if there is a breakout at 3:30 it must use the high +.01 or the low-.01 of the 1200 bar to trigger the signal.

I have tried for days to accomplish this and looked at examples in this forum which I adjusted, but it is still incorrect.

Thankyou to everyone who reads this.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Deepmoney LLM
Elite Quantitative GenAI/LLM
Exit Strategy
NinjaTrader
Futures True Range Report
The Elite Circle
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
Battlestations: Show us your trading desks!
26 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
The Program
17 thanks
  #3 (permalink)
 SidewalkAerobics 
Los Angels
 
Experience: Intermediate
Platform: MultiChart
Trading: Emini ES
Posts: 115 since Aug 2018
Thanks Given: 173
Thanks Received: 71



Joe50 View Post
Hello and thankyou for reading this,


I am trying to create the script in Tradestation for trading the 1200 noon bar, so if the price exceeds the high by .01 points or low .01 points a trade is triggered.

I have tried many scripts which reference a time but they are not using the high and low of the 1200 bar unless the trigger time is 1230. If the time is 1330 and there is a breakout it references the 1300 bar not the 1200 bar. What I am trying to do is use the 1200 bar as a static bar so if there is a breakout at 3:30 it must use the high +.01 or the low-.01 of the 1200 bar to trigger the signal.

I have tried for days to accomplish this and looked at examples in this forum which I adjusted, but it is still incorrect.

Thankyou to everyone who reads this.

Here is a line of code for an EasyLanguage entry at noon for the prior high +.01.

It assumes you are using 60 minute bars. Easy language will only trade on the "next bar". So this code activates on the 11:00 bar, but doesn't enter the trade until noon.

If time=1100 Then buy ("Noon_Breakout") 1 contracts next bar at high+.01 limit;

Please ask more questions if this type of code is not what you are looking for.

Good luck with your code.

Reply With Quote
Thanked by:
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,431 since Apr 2013
Thanks Given: 481
Thanks Received: 1,623

Hi Joe50,

depending on the time frame you can store the high and low of a specific bar inside variables and then use these variables later. If you have two variables called vHigh and vLow you could for example store values at 1200 like this (under the condition that you have bars with this timestamp):
 
Code
if Time = 1200 then
begin
   vHigh = High ;
   vLow = Low ;
end ;
Regards,

ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
Joe50
HONOLULU
 
Posts: 23 since Feb 2019
Thanks Given: 6
Thanks Received: 3


SidewalkAerobics View Post
Here is a line of code for an EasyLanguage entry at noon for the prior high +.01.

It assumes you are using 60 minute bars. Easy language will only trade on the "next bar". So this code activates on the 11:00 bar, but doesn't enter the trade until noon.

If time=1100 Then buy ("Noon_Breakout") 1 contracts next bar at high+.01 limit;

Please ask more questions if this type of code is not what you are looking for.

Good luck with your code.

Thankyou for your reply and your time. Close but still off a bit. It will only buy at 1300 and nothing after. If it is 1500 it will not enter the trade.

Reply With Quote
  #6 (permalink)
 edgefirst 
Las Cruces, NM
 
Experience: Advanced
Platform: Tradestation, MC, NT
Broker: TradeStation, IB
Trading: Liquid futures contracts
Posts: 56 since Sep 2009
Thanks Given: 389
Thanks Received: 86

Hi Joe50,

Assuming you are using 1min, 5min, or 30min bars.

 
Code
vars: high_at_noon(0), low_at_noon(0);

if time = 1200 then begin
    high_at_noon = High;
    low_at_noon = Low;
end;

if time > 1200 then begin
   buy next bar at high_at_noon + 0.01 stop;
   sellshort next bar at low_at_noon - 0.01 stop;
end;

Reply With Quote
  #7 (permalink)
Joe50
HONOLULU
 
Posts: 23 since Feb 2019
Thanks Given: 6
Thanks Received: 3


ABCTG View Post
Hi Joe50,

depending on the time frame you can store the high and low of a specific bar inside variables and then use these variables later. If you have two variables called vHigh and vLow you could for example store values at 1200 like this (under the condition that you have bars with this timestamp):
 
Code
if Time = 1200 then
begin
   vHigh = High ;
   vLow = Low ;
end ;
Regards,

ABCTG

I mixed that in with what I had and it did the trick. Thankyou for planting the seed.

Reply With Quote
  #8 (permalink)
Joe50
HONOLULU
 
Posts: 23 since Feb 2019
Thanks Given: 6
Thanks Received: 3


edgefirst View Post
Hi Joe50,

Assuming you are using 1min, 5min, or 30min bars.

 
Code
vars: high_at_noon(0), low_at_noon(0);

if time = 1200 then begin
    high_at_noon = High;
    low_at_noon = Low;
end;

if time > 1200 then begin
   buy next bar at high_at_noon + 0.01 stop;
   sellshort next bar at low_at_noon - 0.01 stop;
end;

I just figured it out. Thankyou very much for your time !

Reply With Quote
  #9 (permalink)
Joe50
HONOLULU
 
Posts: 23 since Feb 2019
Thanks Given: 6
Thanks Received: 3

I used a combination of what was placed on this thread plus a little bit of thinking.

I greatly appreciate everyone's time !

Reply With Quote
Thanked by:
  #10 (permalink)
 
GoldenRatio's Avatar
 GoldenRatio 
Philadelphia, PA
 
Experience: Advanced
Platform: Matlab, TradeStation
Trading: Stocks
Posts: 211 since Aug 2012
Thanks Given: 5,190
Thanks Received: 296


A good way to pay back your thanks is to post your final code, so that others who are struggling (in the future) with a similar problem may know the final solution.

Reply With Quote
Thanked by:




Last Updated on February 27, 2019


© 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