Error Code "0"? - page 3

 
I appreciate you helping WHRoeder, but you're confusing me - what point are you addressing here? Is it possible to just keep the topics separate (hence why I opened the second thread regarding the other topic?)
 
?
 
DomGilberto:
?


He Asked you.....

 Why are you looking at old bars for TriggerBarTime AND the last bar for orderEntry?

 
string            Bias="none"; //<<== global

void CheckForMaTrade()
{

   double i1  = iMA(NULL,60,3,0,1,0,1); 
   double i2  = iMA(NULL,60,5,0,1,0,1);
   double i3  = iMA(NULL,60,8,0,1,0,1);
   double i4  = iMA(NULL,60,10,0,1,0,1);  
   double i5  = iMA(NULL,60,12,0,1,0,1);
   double i6  = iMA(NULL,60,15,0,1,0,1);  
   double i7  = iMA(NULL,60,30,0,1,0,1);
   double i8  = iMA(NULL,60,35,0,1,0,1);
   double i9  = iMA(NULL,60,40,0,1,0,1);
   double i10 = iMA(NULL,60,45,0,1,0,1);
   double i11 = iMA(NULL,60,50,0,1,0,1);
   double i12 = iMA(NULL,60,60,0,1,0,1); 
   double ema21 = iMA(NULL,60,21,0,1,0,1);   

   
   if(i1>i2 && i2>i3 && i3>i4 && i4>i5 && i5>i6 && i6>i7 && i7>i8 && i8>i9 && i9>i10 && i10>i11 && i11>i12){
   TriggerBarTime = Time[1];
      Bias = "Up";
      Comment("Bias is: "+Bias+" since: "+TimeToStr(TriggerBarTime,TIME_DATE|TIME_MINUTES)); //<== Tells me date and time of the bar when all MA's fanned up.
   }   
    
   if(Bias == "up" && Low[1]<ema21 && Close[1]>i12){
    
      OrderEntry(0); //<=== calls a void OrderSend
   }
     
   if(Close[1]<i12){
     DeleteOrder(0);
   } 

Because that is what I am wanting it to do ...? I've only managed to progress to this level...

Just looking at the long side here; I am wanting to know which bar it was where all the moving averages were fanned up. From there I then wait until a pull-back into the 21 EMA...  As long as price close, remains above the 60 EMA, then the order is above the high range of the bar where all MA's fanned up and the bar that dipped below the 21 EMA....

HOWEVER - It is not doing that with this code... If it closes below the 60 EMA, then I need it to check AGAIN to find the bias for all the moving averages to be fanned up or down again before it can consider a pull-back into the 21 EMA and an order to be pushed out....

Likewise, when it is fanned up, all the moving averages do not need to remain in this position to be eligible for a trade entry... I just need it to do this first to initiate the first part (and tell me which bar it was). All that needs to remain is price close above the 60 ema... wait for pulback to dip below the 21 EMA and then throw an order out above the highs of that range....

 

EDIT:  " Why are you looking at old bars for TriggerBarTime AND the last bar for orderEntry?" -- Are you saying that, by me trying to look at the last bar [1] all the time, it isn't actually doing what I want?

 

Don't bother to answer the questions. Just silently change the code:

  1. to look only at the last bar.
  2. the twice defined variable
  3. the double = boolean and iBarShift(double)
  4. The misleading indenting.

You know the answer. Add Print() statements dumping your variables before and inside your IFs and track it down.

 
Would you kindly mind elaborating slightly...
 

You are a troll - I no longer have any doubt.

Please do not feed the troll.

When you respond, you give the troll power. When you ignore the troll, he starves for attention and eventually dies.

 

No WHRoeder you're just not helpful at all. As a matter of fact, you should probably look in the mirror. You're probably 50+ years old, who spends most of his days TROLLING mql4 forums acting like a big swinging dick because you have 6700+ posts, but no official authority round here...

You think writing a response with as little wording as possible means its intuitive for a beginner picking up MQL4 - well it's not... It's not only unhelpful, but its a bigger waste of your time than mine writing a response in the first place.

The only way you appear to help people on this site is by speaking to people who already understand MQL4 and your unorthodox punchy way of explaining things... 

 It's like you state what I am asking help with, in a different way - I have not a clue why you do that... You highlight points that I know I am stuck on and say it in a arrogant way like I didn't already know that was the issue...

 

It's very frustrating for someone who's consistently "helping" people on here.... 

 
DomGilberto:

No WHRoeder you're just not helpful at all. As a matter of fact, you should probably look in the mirror. You're probably 50+ years old, who spends most of his days TROLLING mql4 forums acting like a big swinging dick because you have 6700+ posts, but no official authority round here...

You think writing a response with as little wording as possible means its intuitive for a beginner picking up MQL4 - well it's not... It's not only unhelpful, but its a bigger waste of your time than mine writing a response in the first place.

The only way you appear to help people on this site is by speaking to people who already understand MQL4 and your unorthodox punchy way of explaining things... 

 It's like you state what I am asking help with, in a different way - I have not a clue why you do that... You highlight points that I know I am stuck on and say it in a arrogant way like I didn't already know that was the issue...

 

It's very frustrating for someone who's consistently "helping" people on here.... 

You don't help people to help you . . . if you make it hard for others why would you think they will continue to help you ?  

If the kind of help you want is someone to write your code then there is a simple solution:  Jobs   

 

Listen RaptorUK, I don't want to be a ball ache - Unless I am clearly not understanding the procedures on this forum on how people are supposed to "properly" communicate to one another using MQL4 lingo, then I apologize...

However, I am pretty sure my ask for help above is very clearly written, yet the response I get is ridiculous... and when I ask for someone to elaborate, I get told that I'm trolling :s?

It's just frustrating that people can be helpful, but almost unwillingly... It's like I AM RECEIVING help, yet only on the helpers terms... and if I don't understand what the "kind" person who is offering me assistance is saying, they tell me I am good for nothing and treat me like some moron... 

Just a little strange to me... 

Reason: