InvestorMe Asked me to post this on it's own thread. It's not fully debugged. I don't know why it never opens any long positions. There's still alot about this strategy I don't yet understand.
Valvk talks about his turtle EA currently #2 in the championship. Turtle Power!!
Running backtest, it DOES open long and short positions...
The problem I had is that it only opens positions in backtest if I use "control points"...it doesn't open any orders at all if I use "every tick".
I'm on IBFX...I'll start forward testing as soon as the market opens.
Also, look out for this...
if(OrderType()<=OP_SELL && OrderSymbol()==Symbol() && OrderComment()=="Trend Rider" && OrderMagicNumber()==MAGIC)
else if (OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet);
No orders ever get sent with the comment "Trend Rider", it should be:
if(OrderType()<=OP_SELL && OrderSymbol()==Symbol() && OrderComment()=="Turtles" && OrderMagicNumber()==MAGIC)
don't you think so?
You're absolutely right. This is among a few more issues that are being worked on. I hope we could post the newer version soon so we can get contributions. Please, whoever wishes to contribute can do so and post the new version. It should be team work
Also a turtle man
Im also developing my own turtle EA, perhaps we could work together
Anyways I also started a thread for my Ninja Turtle!
heres the link: https://www.mql5.com/en/forum/175833
Ok Happy Holidays!
do not use ordercomment() to identify your trades, use ordermagicnumber() instead. some brokers modify comments of orders sent to them by an EA.
Good idea. We're already identifying by magic number, so matching comment is kind of redundant.
I fixed the close pending function....
It still wasn't working cause it didn't have anything selected... now it works
for(int i=0;i<=OrdersTotal(); i++)
if(OrderSymbol()==Symbol() && OrderComment()=="Turtles" && OrderMagicNumber()==MAGIC)
i know it's comparision is still redundant but that doesn't really effect anything so I didn't change it. Sometimes redundancy is security, if it doesn't hurt anything.
You shouldn't need to do that.
ClosePending() is called from within the PendingOrders() loop, where the order is already being selected.
What problem are you observing that makes you think it needs to be changed?
some orders weren't closing for me, that's all. I know I shouldn't have had to do it but something wasn't working. Seems that it is now.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.