| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Bob and Jem and Shelley's Pivot Basket auto-trader https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=658 |
Page 12 of 28 |
| Author: | garyfritz [ Thu Jul 05, 2012 9:30 pm ] |
| Post subject: | Re: Bob and Jem and Shelley's Pivot Basket auto-trader |
Ah, I think I have it, Steve. With AllowAdditionsToBasket = false, it monitors all your pairs, looks continuously for pairs that setup with a pullback, then notes when those pairs trigger by crossing the pivot. When enough pairs have triggered, it launches the basket. E.g. if 8 pairs have set up, and 4 have triggered, and MinimumPercentOfBasket = 50, then it opens positions on all 8 pairs. With AllowAdditionsToBasket = true, it monitors as before, but it immediately adds open positions for any pair that triggers. The size of the basket can vary as pairs are added, so you'd want to use the Adaptive TP/SL/etc. Have I got that right? I'm not sure which model would work better. I suspect adding when the trigger might be best but we'll have to see. PS: Happy birthday wifey, and enjoy yourself Steve! |
|
| Author: | SteveHopwood [ Thu Jul 05, 2012 9:42 pm ] |
| Post subject: | Re: Bob and Jem and Shelley's Pivot Basket auto-trader |
Couldn't have put it better myself. Didn't put it better myself. Cheers Gary. I called across to Chris that the self-banning dimwit wishes her happy birthday. She called back, "Thanks. Great that he hit the right button this time." Sorry about that. |
|
| Author: | mobthehop [ Fri Jul 06, 2012 3:30 am ] |
| Post subject: | Re: Bob and Jem and Shelley's Pivot Basket auto-trader |
too funny for words - happy birthday to Chris from my neck of the woods as well..... Luckily I have not earned any monikers yet..... Mop |
|
| Author: | Lifesys [ Mon Jul 09, 2012 4:55 am ] |
| Post subject: | Re: Bob and Jem and Shelley's Pivot Basket auto-trader |
Happy birthday from Aus too Chris. Glad he gets to spend some time with you, not another coders widow!! Steve I notice in BJS there are differing dimension references for TradePair array. Declaration TradePair[][4] - (incl. 0th position), some [5] are in comments (lines 1082, 1087) and redundant Field list lines 983-4 , but line 313 has a live reference to TradePair[cc][6] re a GlobalVariable. Not sure why we do not get an 'index out of range' error? |
|
| Author: | garyfritz [ Mon Jul 09, 2012 2:32 pm ] |
| Post subject: | Re: Bob and Jem and Shelley's Pivot Basket auto-trader |
Because MQL doesn't bother to check things like that. It just causes mysterious and hair-pulling errors when you access beyond the array bounds. (Guess how I know?? Good catch. |
|
| Author: | SteveHopwood [ Mon Jul 09, 2012 5:57 pm ] |
| Post subject: | Re: Bob and Jem and Shelley's Pivot Basket auto-trader |
Oh, she is a coders widow, for sure. There are times when all she gets from me is a muffled grunt. The comments are left over from the conversion of ShelleyJem to BJS. They are not there to inform others, but to show me where the code block ends. The comments could contain a recipe, for all I care. You have to be inside my head to understand, but you really would not want that. As Gary says, we do not get an 'index out of range' error because MQL4 is badly written. It did not create a problem because TradePair[cc][6] is never used again. I have removed the code block. Cheers Pauls. |
|
| Author: | garyfritz [ Mon Jul 09, 2012 6:09 pm ] |
| Post subject: | Re: Bob and Jem and Shelley's Pivot Basket auto-trader |
FYI, not using TradePair[cc][6] again is no guarantee it won't cause a problem. The EA assigned into that location -- and the value got written SOMEwhere. Depending on exactly how MQL is internally implemented and how memory is laid out, that can result in some other unrelated value changing mysteriously, or much worse. Out-of-bounds errors like that can cause horrific problems, which is why any proper language checks for them. |
|
| Author: | SteveHopwood [ Mon Jul 09, 2012 6:22 pm ] |
| Post subject: | Re: Bob and Jem and Shelley's Pivot Basket auto-trader |
Thanks Gary. Guys, I always defer to a Proper Programmer so V 1g is in post 1. Programmers do not come a lot properer than Gary, so I highly recommend this download. |
|
| Author: | feucht [ Mon Jul 09, 2012 6:52 pm ] |
| Post subject: | Re: Bob and Jem and Shelley's Pivot Basket auto-trader |
Seeing a weird problem with 1g (which I saw earlier today with 1d as well). If I try to open a position manually while BJS is active on another chart, my manual position is being immediately closed by BJS. BJS is set to use a Trade comment, which I am not using on the manual trade. Anyone seen anything similar?? |
|
| Author: | trader689 [ Mon Jul 09, 2012 7:27 pm ] |
| Post subject: | Re: Bob and Jem and Shelley's Pivot Basket auto-trader |
im getting little to no activity on multiple demo accounts on this EA, ootb, allowadditionstobasket = true. is this right? is this just a very infrequent trader? |
|
| All times are UTC | Page 12 of 28 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|