TDI CLOSE POSITION IF ...
-
HI,
I want create TDI EA but i have many problem,please help me...
all you know that TDI signal is crossed GREEN line and RED line.I create this part of TDI EA
but not profitable...

I want add many filter to EA but i dont know how do it...
please attention to this image...

for sample in BUY SIGNAL ,TDI EA open a buy position .i want close pos when stochastic lines crossed(CLOSE SIGNAL).and wait until NEXT SIGNAL.
and other my problem is: when i add SL and TP ,when rich to them ,close position (sell or buy) but open another position (sell or buy ) .i dont want open another sell or buy ,i want EA wait until next signal(next crossed).
summary can help me to complet this 2 problem?
1- close position when stochastic crossed signal
2- only open one position when take profit and wait until next signal.thanks .
-
I guess that you have modified version of this example: https://fxdreema.com/demo/mt4-buy-sell-buy-sell-opposite-conditions So you probably have x> and x< in the Condition blocks and these signals happen only when there are crossovers and not in the rest of the candles. So you can close the Buy trade few candles after it was created and the EA will still wait for the next crossover.
To close the trade by Stochastic, add something like "Condition -> Close trades" in separate branch or put it inside the existing blocks somehow.
-
@fxdreema
THNAKS YOU...
but my problem is: when set TP or SL in trade ,when open position and rich TP or SL close trade but OPEN another position, i use filter once per bar ,but open position in next candle.
this my EA link: https://fxdreema.com/shared/XuVSSlVoe
To close the trade by Stochastic, add something like "Condition -> Close trades" in separate branch or put it inside the existing blocks somehow.: CAN SHOW A SAMPLE? -
In blocks 23 and 29 try x> and x< instead of > and <