Forum

An iterable variable declaration

Can I declare variables in a loop, each with a different name? for ( int i= 0 ; i< OrdersTotal (); i++) { if ( OrderSelect (i, SELECT_BY_POS )) { double var + OrderTicket () = OrderOpenPrice () } } So I would end up with a variable for each order ie. varXXXXXXXX = 1.2548

Single EA to manage trailing stop on all open orders on all symbols

Hi All I am thinking about how to write an EA to manage trailing stops for all open orders. It will be attached to a single chart but will manage orders for every symbol. It does not make sense to run the code from OnTick() because it will only execute when the attached chart has a new tick and may

Strategy Tester: Period Setting

Hi All I have written an EA which operates on the timeframe defined manually in the Expert Inputs tab, rather than the timeframe of the attached chart. When I run the EA in the strategy tester i get significantly different results when the Period setting (in the Strategy Tester) is changed, even

Enter on market open

Hi I am looking for a way to enter a market order when a market opens. I check for signals after the market has closed and want to enter on the market open. Is there an EA that will do this? I have searched without success, and I don't know how to code. I would want to be able to specify volume and