- ICustom function
- Why is my indicator showing 0 all the time?
- EA Buffers Not Getting Correct Values from Custom Indicator Buffer
I have to hit Compile about 4 times
What do u mean? Either it compiles or it doesn't...
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...
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...

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use