Hey guys,
I've recently taken up coding MQL4 and am having some trouble with this EA I have been writing.
1. What would be the correct way to tell the EA to do something at a certain time every night? (i.e. 7 p.m.) I have read up on the reference but need a straightforward example of it in the code.
2.
What Im trying to do is tell the EA to go back over the given time period and determine the highest and lowest price from that period. Once it has found it I want to assign that price to the Hi and Lo variables. Is this the right way of doing it?
3.
Is it acceptable to incorporate variables and do the math on them in an ordersend command?
example:
Im trying to tell the ordersend to calculate the stoploss and takeprofit 20 pips below and 80 pips above Variable_A and Variable_B.
I guess that is it for now, I have been lurking these forums for a while and found them to be far superior to the MQL4.com forums. Anyways, I look forward to your responses and hopefully this will help me stop pulling all my hair out.
I've recently taken up coding MQL4 and am having some trouble with this EA I have been writing.
1. What would be the correct way to tell the EA to do something at a certain time every night? (i.e. 7 p.m.) I have read up on the reference but need a straightforward example of it in the code.
2.
Inserted Code
double Hi = iHigh("EURUSD", PERIOD_H4, iHighest("EURUSD",PERIOD_H4,MODE_HIGH,40,1)); double Lo = iLow("EURUSD", PERIOD_H4, iLowest("EURUSD",PERIOD_D1,MODE_LOW,40,1));
3.
Is it acceptable to incorporate variables and do the math on them in an ordersend command?
example:
Inserted Code
OrderSend("EURUSD",OP_BUY,1,Ask,3,Variable_A - 20,Variable_B + 80,"EA Buy",0,1900,Green);
I guess that is it for now, I have been lurking these forums for a while and found them to be far superior to the MQL4.com forums. Anyways, I look forward to your responses and hopefully this will help me stop pulling all my hair out.