
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
Hello,
I open the order based on Richard Donchian 4 weeks high/low on weekly chart
Can I place buy/sell stop entry order?
or how to place order at exact the breakout point, which can be used for back test.
Any sample code?
I used Bid/Ask price comparing to 4 weeks high/low to determine the break out point.
However, I got lots of order close error 131 during EA test.
Here pasted my code:
if((Bid <= prev_low))
{
res=OrderSend(Symbol(),OP_SELL,LotsOptimized(),Bid,3,0,0,"",MAGICMA,0,Red);
return;
}
//--- buy conditions, prev_high is the previous 4 weeks high
if((Ask>=prev_high))
{
res=OrderSend(Symbol(),OP_BUY,LotsOptimized(),Ask,3,0,0,"",MAGICMA,0,Blue);
return;
}
Thanks,
Albert