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
Oh sorry - I am no longer getting any error what so ever. I am getting just buy orders going through and no sell orders...
It's in relation to my previous thread regarding MA cross overs - I still don't get it! But I don't want to wind anyone up and beat a dead horse whilst people are giving me the answer (although I dont understand the answer lol)! Cheers RaptorUK for your help!
Can't speak for anyone else, I'm not getting wound up . . .
If you are getting no errors and no sell order placed then OpenOrdersThisPair(Symbol()) does not equal 0 , what type is that function ? is it an int or a double ? or maybe a bool ?
I think it's because the orders are not simply being placed on where the cross of the moving averages take place, but at a different point.
I know this is the problem! I know I have asked before regarding this on a different topic, but I'd really appreciate the answer to this question (and yes, I know the code is sloppy, I've just spent a lot of time chopping, compiling and running strategy to see first hand how they're communicating with one another. Not to mention the unnecessary way I've written it too... but ignoring that...)
Q.1) With regards to the "double triggerbartime" line and the > than section.... All I am wanting to understand is how I tell this function to find out when all the moving averages are greater than the previous compared moving average, and then forget about making sure they remain in the right order... instead from that point all I need to make sure is, is having PRICE CLOSE remain above the "i12" (60 EMA) - if it does, then it can follow ahead with the other IF statements and throw out a long order via "OrderEntry(0)" - If it doesn't, then it needs to then look at the long (i1>i2 && i2>i3...) line and wait for this to be true again before considering the next lines...
I know the answer is staring right at me, just becoming a little frustrating and would really appreciate this one bit of nugget.... Thanks!
I am wanting to know where all the MA's are fanned out, but they DO NOT need to be true ALL the time... I just want that to be true before anything else... On the basis this is true, all that needs to happen from this price is that NO bars close beneath the 60 EMA (for a long) to remain valid for any long position to be pushed out...
I am using TriggerBarTime to find the highest point from where all the moving averages stacked up in the right order and the bar that then proceeds in touching the 21 EMA...
So although you've straightened out the indenting for me, that pretty much does what I had written before (unless I am missing something?) Probs my fault I didnt explain it properly.
(ah yeah - I know it should be bool that was a mistake - I was simply playing around and forgot to switch them back.)
double TriggerBarTime = (i1>i2 ..
it is true or false 0 or 1 nothing else Third argument to iBarShift must be a datetime. iBarShift(0) or (1) will ALWAYS be Bars-1.datetime TriggerBarTime;
I have this in the global section...I dont understand your previous post? ^
Is it possible to suggest how I write the If line relative to my post above yours?