| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Who wants a challenge? https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=794 |
Page 2 of 2 |
| Author: | fxprotrader [ Mon Sep 03, 2012 10:59 am ] |
| Post subject: | Re: Who wants a challenge? |
Conundrum, that about sums it up. I'm not a noob, I've been doing this for quite a while, and usually I can figure things out on my own, but this one has me stumped. As you said if you don't take the trade on the straddle bar or the bar after the straddle bar now you have to go back and see where the straddle bar was in each successive bar if you still have not taken a trade. Plus you have to check the high and the low on each bar, that's why I thought a for loop would work better but in the end it failed the test. The reason I'm not taking a buy signal on the straddle bar is there's another indicator that must show a TRUE value which may not be TRUE on the straddle bar but if it's TRUE at any bar up to 5 bars past straddle bar and has not exceeded the MA +5 limit I can still take a trade. Keep in mind we're on the M1 timeframe. |
|
| Author: | Bruce Flea [ Mon Sep 03, 2012 5:16 pm ] |
| Post subject: | Re: Who wants a challenge? |
Since you have that third filter, doesn't that make it easier? Could you use the bool as the first condition, then look for your MA crossing bar (and <5 requirements), and then add the direction? Not knowing your boolean, or directional rules, it seems that would be enough to cancel out most of the straddle bars just getting those 4 conditions to line up right. It sure would eliminate the need for looping at any rate. |
|
| Author: | fxprotrader [ Mon Sep 03, 2012 5:40 pm ] |
| Post subject: | Re: Who wants a challenge? |
It does make it easier but once you get past the straddle bar +1, straddle bar +2 also not too difficult, but when you get to straddle bar + 3,4 and 5, it gets a lot more complicated. If I had a way of marking the straddle bar then always reference it, for example if I'm at straddle bar +5 if I had an instant reference to the straddle bar that would be a big help. Matter of fact it would probably solve the entire problem. The way I approach it was start at straddle bar +5, see if price greater than MA +5. Then check the previous bar to see if it closed higher then MA +5. If it did, abort the loop. Just because 5 is the max bars that an order can be entered on. You have to do this with 2,3 and 4 as well, but you always have to start with the current bar if that's 2,3,4 or 5, and work your way back. By using a loop if you're only at straddle bar +3 and at MA +5 then you can abort the loop. Using all these IF conditions its much more difficult to do but probably possible. The directional rules are as disclosed on the screenshot. All I need to do is mark the eligible bars at this point. In this screenshot you would need to abort at bar 4 because bar 3 exceeds the MA +5 limit, which means at bar 4 you would need to check to see if bar 3 exceeded the MA +5 limit, it did so thats the end of this trade setup. In this screenshot all 5 bars are eligible because none of them exceeded the MA +5 limit |
|
| Author: | Bruce Flea [ Mon Sep 03, 2012 6:41 pm ] |
| Post subject: | Re: Who wants a challenge? |
Okay, some clarification needed. In your first post, you said that the first low that was above the 20MA, but <5 above was a valid entry. All other filters aside, wouldn't that arbitrarily make bar 1 in both instances above, the entry bar regardless of subsequent bars that provide optional entries as well? I guess I'm not seeing the whole picture here, because everything keeps pointing back to the first bar being correct. in every instance you've posted. And some of those could be filtered out by giving it a directional bias. Like only bars Close>Open Low>MA20, would be valid up bars? |
|
| Author: | fxprotrader [ Mon Sep 03, 2012 7:02 pm ] |
| Post subject: | Re: Who wants a challenge? |
Except keep in mind that there is another indicator that may not be giving a TRUE value at either the straddle bar or straddle bar +1 in which case we keep going until the indicator gives a TRUE signal provided it doesn't exceed MA +5 and/or 5 bars. I'm leaving the indicator out at this time because I just need to figure how to mark eligible bars. As far as directional bias as you can see in the last screenshot it doesn't matter if they're higher highs and lower lows etc. It's 5 bars, period. |
|
| Author: | Bruce Flea [ Mon Sep 03, 2012 8:55 pm ] |
| Post subject: | Re: Who wants a challenge? |
Okay, I'm officially lost then. Because what's the sense of just marking 5 consecutive eligible bars? If none of them get a positive value from the bool, none of them are technically eligible anyway, why the extra code just to count them? Seems a bit of a tail chase if you can eliminate most, or all with either this other condition, or the <5 cap. But hey... I'm no expert here. I officially know just enough to be dangerous |
|
| Author: | fxprotrader [ Mon Sep 03, 2012 9:44 pm ] |
| Post subject: | Re: Who wants a challenge? |
The reason is I need to cover all possible scenarios. In most cases a buy would be executed within the 1st 2 bars but if the other indicator does not give a TRUE condition and it will need to keep going as long as its in the 5/5 window. |
|
| Author: | dietcoke [ Tue Sep 04, 2012 7:08 am ] |
| Post subject: | Re: Who wants a challenge? |
A question. Why do you need to start your checks from the right hand bar?? surely it makes more sense to start from the left and deal with the bars in the correct order! you can use an array[5] of bool to hold whether each bar passes the test. this can then be referred to in subsequent bars |
|
| Author: | MrLong [ Tue Sep 04, 2012 7:42 am ] |
| Post subject: | Re: Who wants a challenge? |
Code: Select all If Ask+ 5 > Ma enter or If Bid- 5< Ma enter somthing like above should work. |
|
| All times are UTC | Page 2 of 2 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|