Show some code.
Thank you for responding. here is the section that I am running.
while(start_count < end_count)
{
//- Alert("This is inside WHILE");
RefreshRates();
Alert("3. Bid next price ",my_bid);
Alert("4. Stop loss level ",stop_loss_level);
Alert("5. Take profit level ",take_profit_level);
ticket=OrderSend(Symb,OP_BUYSTOP,lots_to_order,my_bid,2,stop_loss_level,take_profit_level);
if(ticket<0)
{
Alert("OrderSend failed with error #",GetLastError());
return(0);
} //- if(ticket <0)
my_bid = bid_next-bid_space;
bid_next=my_bid;
stop_loss_level = my_bid+stop_pips;
take_profit_level = my_bid-take_profit_pips;
magic_number = magic_number+1;
start_count=start_count+1;
Alert("6. start_count",start_count);
} //-while(bid_next <= bid_last)
There are no DLL calls in that code sample.
Run GetLastError() before AND after your OrderSend().
There are no DLL calls in that code sample.
Run GetLastError() before AND after your OrderSend().
That is what is bugging me... there are no DLLs in the code but MT4 is just saying that the OrderSend() function is erring out with a 4019 error code.
any other ideas?
Run GetLastError() before AND after your OrderSend()..
GetLastError() = 0 before OrderSend()
GetlastError() = #4109 after OrderSend()
How about setups? is there anything i need to setup before I can run an MQL4 script?
You have a different error now?
ERR_TRADE_NOT_ALLOWED | 4109 | Trade is not allowed. Enable checkbox "Allow live trading" in the expert properties. |
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi everyone,
I am very new to MQL4 programming and I would like to seek guidance from all of you. I am using FXDD's MetaTrader4 as my platform.
I am passing an OrderSend() function and I get error #4019. ERR_CANNOT_CALL_FUNCTION 4019 At calling of an imported function, it was found out that dll or ex4 library did not contain the called function.
may I ask you to please give me some quidance on how to proceed?
thank you.
MWL4_newbie