Remember a bar's close after event/condition - EasyLanguage Programming | futures io social day trading
futures io futures trading


Remember a bar's close after event/condition
Updated: Views / Replies:95 / 6
Created: by boo50 Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

 
 
Thread Tools
 

Remember a bar's close after event/condition

 
Bangkok, Thailand
 
 
Posts: 4 since Aug 2019
Thanks: 0 given, 0 received

Remember a bar's close after event/condition

Hello, need advice on programming on easylanguage

I need to code a breakout of high of a bar, which have a condition.
For example - this bar hit moving average from top, so it's high will be a stop buy.

 
 
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
 
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,153 since Apr 2013
Thanks: 384 given, 1,389 received


boo50,

you can accomplish this by declaring a variable and updating the variable's value to that value you want to store when your conditions are met.

Regards,

ABCTG

Follow me on Twitter Visit my Facebook
 
 
Bangkok, Thailand
 
 
Posts: 4 since Aug 2019
Thanks: 0 given, 0 received

I've tried this logic
 
Code
vars: buy_stop(0);

condition11 = rsi(30) > 60;
condition12 = average(c,1) cross below xaverage(30);
if condition11 and condition12 then buy_stop = h[1];
if marketposition = 0 then 
	begin
		buy next bar at buy_stop stop;
	end;
but it buy not at condition's bar high.

 
 
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,153 since Apr 2013
Thanks: 384 given, 1,389 received

boo50,

you can use the print reserved word to check values within your code and see if the code is using the values you think it should. High[1] for example would return the value of the previous bar and not the bar where your conditions are met.

Regards,

ABCTG


boo50 View Post
I've tried this logic
 
Code
vars: buy_stop(0);

condition11 = rsi(30) > 60;
condition12 = average(c,1) cross below xaverage(30);
if condition11 and condition12 then buy_stop = h[1];
if marketposition = 0 then 
	begin
		buy next bar at buy_stop stop;
	end;
but it buy not at condition's bar high.


Follow me on Twitter Visit my Facebook
 
 
Bangkok, Thailand
 
 
Posts: 4 since Aug 2019
Thanks: 0 given, 0 received

got it, but still want to know how to fix condition's bar high.
any suggestions?

 
 
 Vendor: www.abctradinggroup.com 
Hamburg Germany
 
Trading Experience: Advanced
Platform: Multicharts, Tradestation
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 2,153 since Apr 2013
Thanks: 384 given, 1,389 received

boo50,

I am not sure I understand you correctly. Your code already does that, except you are saving the previous bar's high (using buy_stop = h[1] when you probably want the current bar's high i.e. High[0] (or simply High) instead.

Regards,

ABCTG


boo50 View Post
got it, but still want to know how to fix condition's bar high.
any suggestions?


Follow me on Twitter Visit my Facebook

 



futures io > > > > > Remember a bar's close after event/condition
Thread Tools



Upcoming Webinars and Events (4:30PM ET unless noted)
 

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to setup condition which change another condition in strategy? Tomass NinjaTrader Programming 5 September 14th, 2016 09:13 AM
Automatically close out all positions when condition is reached hdsouza ThinkOrSwim Programming 2 January 28th, 2016 08:51 PM
link an exit condition to a particular entry condition vegtrip ThinkOrSwim 0 October 12th, 2013 09:49 AM
How to step forward bar by bar (F12) with full bar not half bar? mercyman MetaTrader 1 October 23rd, 2012 05:49 PM
Close[0] not waiting until bar close dsraider NinjaTrader Programming 4 February 11th, 2010 06:49 PM


All times are GMT -4. The time now is 09:50 PM. (this page content is cached, log in for real-time version)

Copyright © 2020 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts