[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 56

 
yosuf:

Another question, is it possible to manage a real account simultaneously from two computers, one at home and one at work?

you can, no problem
 
zxc:

There's a spread in the tester. Exactly the same as on the chart when the test was run.

I see. Are you sure?

and there's no error in the piece of code I posted?

 
alsu:
you can, no problem
Thank you.
 
Guys, could you tell me on which timeframe to test the EA inthe"strategy tester" to get a more accurate result?
 
oDin48:
Guys, please advise me on what timeframe to test the Expert Advisor in the "strategy tester" to get a more accurate result.


M1, "all ticks" mode

only this does not guarantee the profitability of the algorithm

 
orb:

I see. Are you sure?

and there is no error in the piece of code I posted?


It's not clear what you want to do, so I can't judge whether there are errors or not.

Here's what catches your eye right away:

Bid-Open[0]

Open[0]-Ask

Open[0] is the bid opening price

i.e. the first:bid current minus bid open

and the second: bid open minus ask current(bid minus ask)

 

Dear Expert Advisors, please check if I have correctly prescribed the conditions for an EA which needs to open BUY order under conditions:

1. check that there are no open positions and pending orders if(OrdersTotal()==0

2. Check the previous bar on the condition that the open price is higher than the close price. if(Close[1]<Open[1] && High[1]<Bid) // probably false

3. Open BUY order at the moment when the current bar price touches the price BID of the HIGH

of the previous candle. The order must be open with protective orders SL and TP

equal to the values set in the external variables.

4. Not to open new orders until any of the values of sl or tp

5. Move sl to Breakeven when the profit in the trade is equal to the value in the external variables Extern int


extern int tp = 200;

extern int sl = 100;

int start()

{

//----

if(OrdersTotal()==0 && Close[1]<Open[1] && High[1]<Bid) // check if the close price of the previous bar is lower than the open price. Buy order when the price reaches the current bar price Bid , high level of the previous bar.

OrderSend(Symbo(),OP_BUY,0.01,Ask,0,Ask-sl*Point,Ask+tp*Point,"",777,0,Red);

//----

return(0);



The question is, how and where do I enter these commands correctly for my Expert Advisor?

4. Do not open new orders until any of the values of sl or tp

5. To move sl to the breakeven point, when profit in a trade will be equal to values in external variables Extern int

 
oleg_felix:

1. check that there are no open positions and pending orders if(OrdersTotal()==0

4. Do not open new orders until any of the values of sl or tp

.

if(OrdersTotal()==0 ...) // check if there are no open orders...

OrderSend(Symbo(),OP_BUY,0.01,Ask,0,Ask-sl*Point,Ask+tp*Point,"",777,0,Red);



The question is, how and where should these commands be entered correctly for the Expert Advisor?

4. Do not open new orders until any of the values of sl or tp

???
 
zxc:


It is not clear what you want to do, so I cannot judge whether there are mistakes or not.

Here's what immediately catches your eye:

Bid-Open[0]

Open[0]-Ask

Open[0] is the bid opening price

i.e. the first:bid current minus bid open

and the second one: bid open minus ask current (bid minus ask)


This goes straight into the analogue.

Open[0] is the open price of a new bar