Arrow Appears on Every Candle

KD_R

Trader
Sep 17, 2022
10
1
9
35
Hi ,

I have craeted my first indicator using EABuilder but the problem is arrow showing on every candlestick whereas it should appear on first candlestick where all condition met for entry... i am attaching the code here, if @Enivid or somebody can help out to rectify the error that would be great help.. Thanks
 

Attachments

  • First One.mq4
    5.4 KB · Views: 9

Enivid

Administrator
Staff member
Nov 30, 2008
16,986
1,020
144
Odessa
www.earnforex.com
You are checking for some conditions at the bar. If you want the arrows to appear only when those conditions are first met - i.e., the first bar after some of them weren't met, then you need to add conditions checking whether one of those conditions wasn't fulfilled one bar earlier.
 
  • 👍
Reactions: KD_R

KD_R

Trader
Sep 17, 2022
10
1
9
35
You are checking for some conditions at the bar. If you want the arrows to appear only when those conditions are first met - i.e., the first bar after some of them weren't met, then you need to add conditions checking whether one of those conditions wasn't fulfilled one bar earlier.

Thanks @Enivid for suggestion and i make it works, now i am trying to add Trial Period Function in this Indicator but the problem is when i try to paste the code my indicator arrows disappear, this is where i m putting my code and the code i am using is also below and while compiling i am not getting any error too

pls help

View attachment 22681View attachment 22681
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,986
1,020
144
Odessa
www.earnforex.com
Thanks @Enivid for suggestion and i make it works, now i am trying to add Trial Period Function in this Indicator but the problem is when i try to paste the code my indicator arrows disappear, this is where i m putting my code and the code i am using is also below and while compiling i am not getting any error too

pls help

View attachment 22681View attachment 22681
It looks like you've tried to attach some images, but I don't see them. Please re-attach.
 

KD_R

Trader
Sep 17, 2022
10
1
9
35
Hm... So, you are making it not to initialize if the current date is greater than 2020-07-23. The current date is obviously greater than that, so it stops working. What's the problem here?
No no this is just the example, I put it next 1 year date but the problem is whenever I put this code my indicator is not displaying any arrows
 

Enivid

Administrator
Staff member
Nov 30, 2008
16,986
1,020
144
Odessa
www.earnforex.com
No no this is just the example, I put it next 1 year date but the problem is whenever I put this code my indicator is not displaying any arrows
Perhaps, you aren't entering the date correctly? You could try printing it before the return(-1) statement. Also, could you be modifying one file but trying to run another one?
 

KD_R

Trader
Sep 17, 2022
10
1
9
35
Perhaps, you aren't entering the date correctly? You could try printing it before the return(-1) statement. Also, could you be modifying one file but trying to run another one?

Thanks @Enivid i get this correct now its showing the Trial Period on my Indicator, i used string expiry date with the same code and it works.. Thanks Again