Set this up and share the project to look at. Why not set up a button for the first trade, pink for each, pips away, will place a trade when pips apart, or pending orders. constants will create adjustable inputs,
@bagheria For backtests, there is a "If Testing" block. Unfortunately with the backtester, OnChart doesn't work with buttons, but OnTick does. So if you want to backtest with it, you need to have an If Testing block, connected to the rest of your logic OnTick.
Your button should be created on the OnInit tab and controlled on the OnChart tab. All your logic seems to be looped in a mess when it could be much more simple. That's probably why it doesn't work.
Hello Jasp, maybe my explanation was not clear. The robot completes all the construction steps. The problem is generated when the operations are closed by reaching the take profit (when the operations are closed by trailing stop, the trend has reversed and the conditions are surely already in place to open contrary orders) but if the trend continues, Example : the take profit was 150 pips and the trend continues up to 500 pips; Not only does it not reopen orders in favor of the trend; sometimes it opens orders to the contrary. I wanted to know if I can build a module that tells the robot that if the conditions that generated the first orders are maintained, it should open more orders in the same direction. Thanks for answering
@jstap omg.. the point is to experiment with trailing stop loss expanding when price moves above buy and take profit expanding when price moves below it. it's simple as that. please can someone just help me out instead of trying it the old fashion way...
great! using simple chart & object can trace and store value into variable, no need terminal variable, will later future improve the function. Thank u to everyone spend time and share the idea, great.