Trouble yet again

 
Okay, so with a few pointers from some kind folk on this forum. I've created an indicator that pretty much gives me a definitive signal. Basically I have it put an arrow in a separate window for my long and short entries and exits. I tried making an EA to follow it and it wouldn't do anything... I then made it follow a different buffer in the Custom indicator and it sort of worked but not really.... it followed but it wasn't doing it correctly (supposed to buy once the point value reached >13 but it would get in at 4... don't get it). Also, my indicator works well except for the fact that if I want all the arrows to be... well.. accurately calculated... I have to hit Compile about 4 times. I don't think a sample of my ind would really help... but any suggestions as to remedy would be appreciated. I think the EA will fix itself if I can get the compiling problem solved. Let me know if you do need a sample of it though....
 

I have to hit Compile about 4 times


What do u mean? Either it compiles or it doesn't...

 
gordon wrote >>

I have to hit Compile about 4 times

What do u mean? Either it compiles or it doesn't...

I can load the CI and it will make my arrows appear... but there is code to make it to where two wont show up in a row... but the chart will have several... so i hit compile and it will fix it but then I am missing some arrows again... so I hit compile and they reappear but they still dont show up two in a row... so it basically fixes it.... I will post pictures in a few moments here... and will put up parts of my code (lots of spam for the whole thing).

 

//----
if (down<up && up>=diff && Long[i+1] == EMPTY_VALUE) {Long[i]=-10;Short[i]=EMPTY_VALUE;} else if (up<down && down>=diff && Short[i+1] == EMPTY_VALUE) {Long[i]=EMPTY_VALUE;Short[i]=-5;} else {Long[i]=EMPTY_VALUE;Short[i]=EMPTY_VALUE;}
if (Long[i+1] == -10 || Long[i+2] == -10 || Long[i+3] == -10 || Long[i+4] == -10 || Long[i+5] == -10 && up<diff2 && down>0) {Exit0[i]=-10; Exit1[i]=EMPTY_VALUE;}
if (Short[i+1] == -5 || Short[i+2] == -5 || Short[i+3] == -5 || Short[i+4] == -5 || Short[i+5] == -5 && down<diff2 && up>0) {Exit1[i]=-5;Exit0[i]=EMPTY_VALUE;}
PPoints[i]=up;
NPoints[i]=down;
//----

I would actually like to change the Long[i+1] stuff into an actual value of whether it already received a value to open... but when I attempted it... it would not open anything at all... and when it would draw a line it would simply draw it only when there were arrows... so clearly I am missing something here...


Initial Load

Compile after Load

to explain a little if it wasn't already obvious... Long entry and exit on the bottom... short entry and exit on the top under the histogram

 

I assume the EA is attached to the chart when u press compile? That's why u r getting 'it will fix it but then I am missing some arrows'' when u press compile again... cause the EA goes through a deinit() and init() and starts again. I recommend u detach the expert from the chart and press compile once. If there are no errors then attach it and check it out. Pressing compile again and again might have the side affect you want but it is obviously not the way to go.


Anyway, as for solving your problem, there is simply not enough to go on. Maybe if you post the entire code...

Reason: