why intervals are not respected and why only buy trades is opened ?
-
Good day
I hope you can help me with this.
https://fxdreema.com/shared/RMxp0zbCd
This EA must do following:
1- Open buy :If current candle OBV is higher than previous candle OBV and vice versa.
2- If above condition is met then their must be X seconds intervals between each trade and the next one and first the variable (OBV_LAST_TRADE_BUY) must reset to 0 and after opening the trade the same variable must be updated to the value of OBV at the opening time so the EA will use this variable for opening more trades…
Actually , what is happening is :
1-The EA continue opening only BUY trades and no sell trades is opened..
2-Time intervals is not respected..
Can you please tell me what is wrong and how to fix it ? ..tks -
Here you have some initial corrections to do:
- Remove those 'pass' blocks. They are unnecessary.
- Renumber the blocks on top of each block tree according to the expected execution. Now the 'modify variables' blocks number 1 will always be resetting lot size to 0. Do you really need that.
- If you need time intervals between trades you will need independent pink 'for each position' block trees instead of 'once per seconds' blocks.
-
thank you for your replay
points nr.1 and 2 are clear, thankyou.
i am not able to understand your point nr.3.... !! yes i need intervals between trades , ok to put "for each position" block but do i have to remove "once per position block" ? how then the EA will test the time intervals ?
https://fxdreema.com/shared/mIAdXbJWd hear i added "check age" block but again the time time intervals is not respected..
KINDLY TRY TO RECTIFY THE MISTAKES IN THIS MY MODIFIED EA...
THANK YOU VERY MUCH FOR YOUR SUPPORT
RGDS -
You don't need to use any group number now. You can remove them. And yes, you should a 'once per trade' pink block before opening a new trade.
-
thank you for your kind answer
https://fxdreema.com/shared/vfVultwE
1- i did as you instructed , kindly confirm that the EA now is correct..!!!
2- even though i am not able to understand the logic behid your instruction but it seams to work now , the EA do respect the time intervals...!!!
3- the EA should open a buy trade if the value of OBV indicator on the 1 minutes time frame current candle is higher than the OBV value on 1 minutes time frame previous candle and vice versa... to my greate surprice , the EA now is opening only BUY trades an no one sell trade...even though i tested it back for few years!!
kindly can you tell me how to make it run correctly opening booth buuy and sell trades ??
thank you for your support
rgds