[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 61

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Find the line: #include <strlib.mgh>
and replace with: #include <stdlib.mgh>.
And I have both such and such library. The second came with the EA. But when compiling it the editor doesn't see it and gives an error.
It was silatyt who misprinted and I repeated =). The message above is correct. The error is 'strlib.mqh' - cannot open the program file
check if it exists in terminal/experts/includes/ folder
check its presence in the terminal/experts/includes/ folder
Help me properly insert for this array, functions to move sl to breakeven, at a certain profit in a trade.
extern int tp = 0; // profit value
extern int sl = 0; // value of lossextern int BeginHour = 0; // time of trade start
extern int EndHour = 0; // time of trade end
extern int lots =0;
int start()
{
//-- Buy trade. Checks if there are no open orders and the close price of the previous bar is lower than the open price.
//-- Buy order when the current Buy price reaches the High of the previous bar. Time period when the robot will perform the trade.
if (OrdersTotal()==0 && Hour() >= BeginHour && Hour() < EndHour && Close[1]<Open[1] && High[1]<Bid )
OrderSend(Symbol(),OP_BUY,lots,Ask,0,Ask-sl*Point,Ask+tp*Point,"",777,0,Red);
if (OrdersTotal()==0 && Hour() >= BeginHour && Hour() < EndHour && Close[2]<Open[2] && High[2]<Bid )
OrderSend(Symbol(),OP_BUY,lots,Ask,0,Ask-sl*Point,Ask+tp*Point,"",777,0,Red);
//if (OrdersTotal()==0 && Hour() >= BeginHour && Hour() < EndHour&& Close[3]<Open[3] && High[3]<Bid )
// OrderSend(Symbol(),OP_BUY,Ask,0,Ask-sl*Point,Ask+tp*Point,"",777,0,Red);
//-- Sell trade. Check if there are no open orders and the close price of the previous bar is higher than the open price.
//-- Sell order when the current bar's Bid price reaches the Low of the previous bar. Time period when the robot will perform the trade.
if (OrdersTotal()==0 && Hour() >= BeginHour && Hour() < EndHour && Close[1]>Open[1] && Low[1]>Bid )
OrderSend(Symbol(),OP_SELL,lots,Bid,0,Ask+sl*Point,Ask-tp*Point,"",777,0,Red);
if (OrdersTotal()==0 && Hour() >= BeginHour && Hour() < EndHour && Close[2]>Open[2] && Low[2]>Bid )
OrderSend(Symbol(),OP_SELL,lots,Bid,0,Ask+sl*Point,Ask-tp*Point,"",777,0,Red);
//if (OrdersTotal()==0 && Hour() >= BeginHour && Hour() < EndHour && Close[3]>Open[3] && Low[3]>Bid )
//OrderSend(Symbol(),OP_SELL,lots,Bid,0,Ask+sl*Point,Ask-tp*Point,"",777,0,Red);
//----
//----
return(0);
}
Hello, can you tell me how to find the integer part.
I get a fractional number, "0.0053 for example", but how do I go to just 53? in order to find the volume in pips of the previous candle...
Hello, can you tell me how to find the integer part.
I get a fractional number, "0.0053 for example", but how do I go to just 53? in order to find the volume in pips of the previous candle...
Hello, can you tell me how to find the integer part.
I get a fractional number, "0.0053 for example", but how do I go to just 53? in order to find the volume in pips of the previous candle...