Go to the ''Get Lots'' function, start at line 411. Change this: if( profitSequenceCount > 0
Printable View
Go to the ''Get Lots'' function, start at line 411. Change this: if( profitSequenceCount > 0
I uploaded a new version. I haven't seen it generate errors with the SL, I even tried it with EURUSD for quite some time. There's more information for debug. You can click on the text "Seq" to see all the internal variables (this doesn't work in the tester, only in live graphics).
Thanks for your effort, brother. But the previous version was more aligned with what I needed, it only required a couple of adjustments. BuyandSell�s function never worked as I wanted. I used only �Buy only� or �Sell only�, and that did work well in one direction. The SL could not be modified in any version. The old one put 1000 pips by default in pairs with yen. None of the versions makes purchases in pairs like EURUSD, GBPUSD, etc. It only works in sales or JPY pairs. These are the errors that come out to me: �invalid stoploss for OrderSend function� �OrderSend error 4107� I find the same in the new version when I put �Buy only�. Believe in your analysis and keep the plan, don�t panic with the moves.
I just want one thing in the previous version, bro: That allows you to operate in other pairs and that you can edit the stoploss. Believe in your analysis and keep the plan, don't panic with the moves.
I don�t know what to think. I have it running without mistakes. This is the result with EUR/USD in 15 minutes, with strategy tester in Oanda: 21,407 candles, 299 winning transactions, 564 with loss. Initial deposit: $10,000, final balance: $10,041. All were purchase deals. In addition, I added an option to take signals without waiting for a new candle.
I found the cause of the error with the SL. It�s a risk of testing during the weekend. When you test at the weekend, MarketInfo returns zero. With that, my calculation gave a minimum SL of 1 pip, which generated errors. Today with the open market, it returns 11 points (0,00011
Try declaring the MagicIndex with a different name to avoid conflict with the global. That should already remove at least one of the compilation errors.
Have you tried running the EA in demo account to see if it reacts the same as in the tester? Many times the behavior is different in real time.
Yes, I did it in demo and it behaves the same. The problem is with purchase orders, it just doesn�t throw them if it�s not even with JPY. Believe in your analysis and keep the plan, don�t panic with the moves.
Are you sure that the pips multiplier is correctly defined for pairs with 5 digits? That is a common error with invalid SL and TP.