need help, code doesnt work
Your SL and TP are almost certainly too small. Bid+10*Point is most likely below the Ask opening price.
Your SL and TP are almost certainly too small. Bid+10*Point is most likely below the Ask opening price.
i didn change the return ( dont know where to find it), but i changed SL and TP, i put two more 0, so that was the problem. Thanks
But now the strategy tester appears to open multiple orders, so how could i solve this new problem? Could you provide a code to limit to just 1 ordersend?
thanks
i didn change the return ( dont know where to find it),
Check the return from the OrderSend() look it up in the documentation.
But now the strategy tester appears to open multiple orders, so how could i solve this new problem? Could you provide a code to limit to just 1 ordersend?
Every question that you may have has been asked and answered many times. Read some old posts and you can learn a lot.
You say that you don't know where to find out about the return from OrderSend(), yet right there in the documentation for OrderSend is
int ticket=OrderSend(Symbol(),OP_BUY,1,price,3,stoploss,takeprofit,"My order",16384,0,clrGreen); |
I am sorry, but I am not going to write your code for you a line at a time. You have to do some research yourself.

- Free trading apps
- Free Forex VPS for 24 hours
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
'im new in mql4, and need help, this code doesnt work, but why?
it should open a trade if the price cross ichimoku, why it doesnt work? thanks
{
double up= iIchimoku (NULL, 5,9,26,52,3,0);
double down= iIchimoku (NULL,5,9,26,52,4,0);
if (up && down < Bid )
{ OrderSend (NULL,0,0.01,Ask,3, Bid-15*Point, Bid+10*Point);}
}