Can anyone take a look at this and tell me if i got the right set up for this EA just try to open two position a buy and a sell no particular price

 

//+------------------------------------------------------------------+
//| STEP TRADER.mq4 |
//| LAS |
//| |
//+------------------------------------------------------------------+
#property copyright "LAS"
#property link ""
#define EA STEP TRADER
#define VER "1_01"
extern int Interval=0;//Minutes before adding a position (0=not used)
extern int Reduce=600;//Minutes before reducing TP by one pip (0=not used)
extern int Live=0;//Minutes before closing an order regardless profit (0=not used)
extern int Volatility=100;//volatility bars (positive>directional or negative>non dir.)
extern int Threshold=1;//pip threshold for volatility
extern int FridayClose=10;//At what time to close all orders on Friday (0=not used)
extern int slippage = 3;
extern double spreadlimit = 5.5;
extern int magic =1001;
double high4, high1, high30, low4, low1, low30, high4s, high1s, high30s, low4s, low1s, low30s;
int tim=0, timm=0, tim30=0, tim1=0, tim4=0, lDigits, dig, pip;
int init() {
min=MarketInfo(Symbol(),MODE_MINLOT);
max=MarketInfo(Symbol(),MODE_MAXLOT);
lNorm=MarketInfo(Symbol(),MODE_LOTSTEP);
//---------------------------------------------------------------------------------------
Step one
//---------------------------------------------------------------------------------------
start()
OrderSend(Symbol(),OP_BUY,UseLots(),Bid,slippage,Bid+StopLoss*Point,Bid-TakeProfit*Point,EA,magic,0,Green);

OrderSend(Symbol(),OP_SELL,UseLots(),Bid,slippage,Bid+StopLoss*Point,Bid-TakeProfit*Point,EA,magic,0,Red);

 

You gave us the code...

However, you did not give entry specifications....

We need YOUR CODE versus WHAT YOU ACTUALLY WANTED.

Do you understand???

Besides this, USELOT() is not included....

If you are not entering on specific prices, how are you entering...

SPORADIC RANDOM TIMING?????

 

Your function { } are probably not functional either.....

 

thanks ckingher

what im trying to do right now is learn how is work.so all im trying to do is open a buy and a sell at any price as soon as EA opens on chart do i need something like start at next tick or what

 
Start is a special function that is called every tick(ish). You have problems with { missing on init() and start(). You also need return(0); at the end of each of these special functions. You should use Print() a lot when first coding to make sure it is doing what you think it should and you should use GetLastError() to test for any error codes.


Just incase you haven't seen it... https://book.mql4.com//

and this is one of my most referenced posts...https://www.mql5.com/en/forum/122679


hth

V