[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 579

 

Thank you very much. I would have struggled a long time myself. Only "SELECT_BY_POS" and "OrderType()==OP_BUY". And this way everything works as it should.

 
future:

Only "SELECT_BY_POS" and "OrderType()==OP_BUY".

Already corrected))
 
Roman.:


See trailer. Place its contents in the Experts folder of the terminal. Select the timeframe of the instrument you are interested in and place it on the chart of the Expert Advisor,

Set parameters for opening an order in MetaTrader external variables:

Then you wait for the formation of a new bar on the selected timeframe of the instrument.

When the Expert Advisor opens an order from the market, you compare the time of its opening with the time of opening of a new bar.

Thank you for the work you have done. I will study it in practice, for me it is important that the opening price of the order coincides exactly with the price of a new bar. I will write what happens in reality.
 

Good evening, sorry for the question, but I've really looked through everything I can.

Actually, I need a function that detects renko bricks. i.e. it searches for the nearest brick or several of them (if the price has moved strongly), and returns its direction, as well as the number of bricks.

 

Good evening.

I can't find anywhere how to programmatically overlay the Bollinger Bands indicator on another indicator /not on a price chart/ and then find out the upper and lower band values.

I would be very grateful if someone could suggest it.



 
Good day. wrote an EA. the point is to look for ADX, on 30 minute timeframe. 2. 1. if - DI was higher than + DI, and then went down, then look for a buy signal and vice versa. 2. if ADX exceeded 20 or just started to rise, then enter the trade flags - only 3 left 1 on a long position 2 on a short position 3 to check the strength of the movement. advisor
Files:
1.mq4  21 kb
 
Ivn:
Good day. wrote an EA. the essence look for ADX, on the 30 minute timeframe. 2 conditions 1. if - DI was above + DI, and then went down, then look for a buy signal and vice versa. 2. if the ADX exceeded 20 or just started to grow then enter the trade flags - there are only 3 1 on the long position 2 on the short position 3 to check the strength of the movement. the EA
so?
 
I can't get the picture in for 30 minutes.
 

code //---- check for long positions if (x2>x1 && x02 x01) // check for downwards pass { f2=1; // reset buy flag f1=0; // open sell flag } // check for rising ADX > 20, or simply rising ADX ---- check for strength of movement. if (x<20 && x0>20) {f3 = 1; } if ((f1 == 1) && (f3 == 1)){ ABuy=1; ASell=0; f3 = 0; } //open long position, zeroize drawbar strength flag if ((f2 == 1) && (f3 == 1)){ ABuy=1; ASell=0;f3 = 0; } // open a short position, zeroize the draw flag

if we run from 1.01.12 to 15.02.12

>

on 01.01.12 at 14-00 a buy position is opened, I don't know why.

works on 30 min of eurodollar

 
Ivn:
I can't get the picture in for 30 minutes.
What's the extension?
Reason: