Basic questions ... - page 5

 
omelette:
...the error are caused by price mis-matches between different timeframes - not really a problem unless you get loads of these. To get rid of them you would need to delete and re-generate the pairs that give problems, via the History center. Your TP question makes no sense.

Excellent. Thank you; couldn't you or anybody else point it earlier? Anyway, now I know what the problem is and will try to fix it. As for the TP question: you may actually disregard it b/c the EA should notpost the TP value in MT4 since the EA isn't based on prediction; it should only perform the reversal when the crossing happens: either IND1 crosses its 0 level, or IND2's line1 crosses line2. Thanks again. I apologize if my question was thatrhetorical or if the first sentence was a bit rude.

 

To bdht

bdht

Your understanding of ticks is correct.

Regarding iIND2_line1, if it is a custom indicator, you must use iCustom().

else an MA- 'iMA' or other built in can be used.

Period must be at least 1, I believe.

TP is specified at order open or modify, and is automatic.

You can limit to one trade with: if OrdersTotal() ==0

Good luck.

Big Be

 

EA to open order on multiple pairs

Hi guys, i was trying to use this EA to open orders on multiple pairs, but i get no luck, the Alert keeps saying that the other pairs cannot open the order because the price is invalid?

I used all search and knowledgement i have about mql4 but no luck to fix yet, can anybody give me a light?

Here is the code of start() function:

OrderSend("EURUSD",OP_SELL,0.1,MarketInfo("EURUSD",MODE_BID),5,0,MarketInfo("EURUSD",MODE_BID)-100*MarketInfo("EURUSD",MODE_POINT),"Hedge demo",MagicNumber,Red);

OrderSend("GBPUSD",OP_SELL,0.1,MarketInfo("GBPUSD",MODE_BID),5,0,MarketInfo("GBPUSD",MODE_BID)-100*MarketInfo("GBPUSD",MODE_POINT),"Hedge demo",MagicNumber,Red);

OrderSend("USDJPY",OP_SELL,0.1,MarketInfo("USDJPY",MODE_BID),5,0,MarketInfo("USDJPY",MODE_BID)-100*MarketInfo("USDJPY",MODE_POINT),"Hedge demo",MagicNumber,Red);

OrderSend("GBPJPY",OP_SELL,0.1,MarketInfo("GBPJPY",MODE_BID),5,0,MarketInfo("GBPJPY",MODE_BID)-100*MarketInfo("GBPJPY",MODE_POINT),"Hedge demo",MagicNumber,Red);

Let's say, i put the ea on EUR/USD, it open a sell only for EUR/USD, the other pairs alert me with "invalid price" error.

Thanks,

Thomas

 

How to halt other EAs when one is running in the same account?

Say I want to maximize my capital & time in the same account by having more than one EA attached but I do not want more than one to run which might blow up my account, is there a way to do it? Otherwise the account is just sitting there, waiting for only one EA signal to occur.

Once that EA has finished it's run(taken profit or stoploss), all attached EAs

becomes eligible again.

I know this is in the Magic Number Thread but besides Magic Number approach(which requires EA code modification),

there could be other approaches to do this. So, moderator, please do not move my post.

 

I can be done by coding I think.

I will move your post to the thread where the members are replying on coding question and may be some decision can be done or simple tool can be coded.

 

Some decision can be found on this thread by coding: one order per Metatrader (per all the symbols) and so on.

Read this thread from the beginning.

As to separated tool for that so I remember one on some russian website but could find it now. If I find so I will post of course.

 
newdigital:
.....If I find so I will post of course.

Please do,thanks.

 
 
 

Beginner's Question: Does Start() run after each tick ?

Is Start() called after each tick?

I am using the strategy tester to cycle through a few days worth of data with a 1M scale and I have the following line in my Start() routine:

Print(Ask);

I expected to see a Journal entry for each and every tick. When I start the strategy tester with a slow playback setting, I see the chart updating but I do not see the Ask price being printed to the Journal very often. The Ask price is only sent to the Journal about once every 15-30 minutes.

Why is this?

Is it possible to create another tab in MT4 or a debug window in the editor to which text can be sent?

Thanks,

Forexwindo

Reason: