Search
× Search
Saturday, December 21, 2024

Archived Discussions

Recent member discussions

The Algorithmic Traders' Association prides itself on providing a forum for the publication and dissemination of its members' white papers, research, reflections, works in progress, and other contributions. Please Note that archive searches and some of our members' publications are reserved for members only, so please log in or sign up to gain the most from our members' contributions.

EA - Immediate Open Order - No Candle Waiting

photo

 Sean Wilkins, Principal at Assured Finance Today

 Tuesday, January 20, 2015

I want my EA to open when a few rules are met - but it's waiting for the candle bar to open before opening the order - It's also waiting for the bar to open before deciding if it should close. Is there a way I can have the EA open and close the order without having to wait for the bar to open??


Print

12 comments on article "EA - Immediate Open Order - No Candle Waiting"

photo

 Adam Cox, FFIN, MFTA, PMP, Proprietary FX Trader

 Tuesday, January 20, 2015



what's the coding though to open the order?


photo

 Jon Grah, Trading Systems Automation Expert @ AwarenessForex.com

 Wednesday, January 21, 2015



You'd have to show the code for opening and closing the order.

It could be that the code you have to initiate the opening/closing of the trade waits until the conditions are met end of bar.


photo

 Daniele M., Software Engineer presso Magneti Marelli S.p.A. - Electronic Systems and Powertrain

 Wednesday, January 21, 2015



For sure, trading can be performed at tick or at candle level. What kind of trading platform do you have?


photo

 Leonid Basis, Consultant at Independent Consulting

 Thursday, January 22, 2015



Maybe:

1. Your EA is programmed for Bar1 instead of Bar0

or

2. Your EA is waiting until Volume[0] < 1 (for example)


photo

 Juan Pablo R., Profesional SIG en Andean Geological Services Ltda.

 Thursday, January 22, 2015



There should have an option to validate your rule in the current candle, or either on the next bar or bar i + 1, on MQL4 this is known as "shift" and is always defined at the end of list of parameters of each indicator. To use current candle simply use shift = 0.


photo

 Hew K., Optimization, Machine Learning and Algorithmic Trading

 Thursday, January 22, 2015



Perhaps what Sean is referring to is that he wants to trigger a buy or sell or any action, even if there is no tick is happening. In MQL4, wasn't there a timer driven EA?


photo

 Jeremy Roseberry, President at Granite Capital, LLC

 Sunday, January 25, 2015



Most platforms that I am familiar with allow you to execute the order whenever you wish. That would mean, on the open, on the close or "intrabar". The code itself is where you specify when you want it to trade.

ie If A and B then buy this bar on close

If A and B then buy next bar at open


photo

 Leonid Basis, Consultant at Independent Consulting

 Sunday, January 25, 2015



https://www.youtube.com/channel/UC2AZZ6ib_IEbdhtviv05J7Q


photo

 Joe Leonard, Trader at Cambridge Investment Research, Inc.

 Sunday, January 25, 2015



what language I'd used in writing trading problems. I have some great ideas. Than you in advanced.


photo

 Sharky Seeker, Owner, CEO at ForexGT - Algo-Trading with Science and Logic

 Saturday, January 31, 2015



According to your "EA" language you are probably using MetaTrader 4 or 5. If that's the case - you need to check Bar[0] for your entry condition instead of Bar[1].


photo

 Sean Wilkins, Principal at Assured Finance Today

 Sunday, February 1, 2015



Hi guys ive been away - im using mt4 and ontick - think ive sorted it but if not where do I drop the code that opens the order just here?


photo

 Leonid Basis, Consultant at Independent Consulting

 Sunday, February 1, 2015



Hi Sean,

I can update your code, but I need to see it.

Regards,

Leo

Please login or register to post comments.

TRADING FUTURES AND OPTIONS INVOLVES SUBSTANTIAL RISK OF LOSS AND IS NOT SUITABLE FOR ALL INVESTORS
Terms Of UsePrivacy StatementCopyright 2018 Algorithmic Traders Association