Question from a novice - Setting price level orders.

 

Hi all,

New here and new ish to mt4. A very quick question....

I am trying to write a ea which will buy and sell at set levels under certain conditions. I have created the condition filter but am having problems in automating the buy and sell orders.... what I want to do is enter an order to buy or sell at either the 50 or 100 level depending on the condition, ie 99.000, 99.050, 99.100 etc.

Any help or pointers in the right direction would be appreciated....

TIA

Tim.

 

pointers in the right direction

where is the code you tried to create so we can see problems you have

and how you did get them

 
fxtim:
<CODE REMOVED>

This is as far as I have got. What I want to do is set buy orders at 50 and 100 points with 50 SL and 50 TP while fast ema is over slow ema and similar sell orders when fast ema is under slow. I also want it to close open positions should a cross of ema's happen. ie if i am long and the ema's cross at close of bar then close all open orders. Hope that makes sense!

Please read some other posts before posting . . .


Please edit your post . . . please use the SRC button to post code: How to use the SRC button.

 

Wow,

I'm also new ish to mq4 coding.

I'm afraid that I cannot follow your code at all.

I would rather see OP_BUY and OP_SELL instead of the simple integers 0 and 1.

Same with MA Modes. etc.

 
OK will have a re look at what I have done and post up the code a bit clearer when I get a chance. Thx for input so far :-)
Reason: