Please help draw horizontal line on chart as maximum level to close trade and stop EA
-
i want to create a maximum level in profit(100 pips) using horizontal line on chart, virtual level using a variable, then give it a condition when price reach at the level it will directly close trade and stop trade or terminate
link -
-
The chances of the object == candle 0 close is unlikely, even though this is the current changing price?
-
@jstap Thank you for your quick response, but still not clear on how to set the the block. if there is a way to setup maximum level when price reach and stop trade or like switch off
-
If you have the starting value, then adjust by + or - 100 pips and save this result, if price => or =< this number act how you need
-
@jstap yes but i dont know how to save a starting value with variable please help to complete the block
-
To save the level I would need to know the reason, test with this modify variables block, candle 1 high into the variable you created (as a double) - comment block displaying the variable. You can then watch this change on backtest. Use this principle to get your starting level. When this is working add a second variable adjusted to +100 pips and add this to the comment, then you can use the values to place lines, so on test you can visually see what's happening.
-
@jstap Thank you for your reply, i try but i couldn't get a positive result. need the first trade to save value for 100pips and subsequent trades for every 10pips, and continue to trade until reach a maximum level of 100pips then the ea will terminate. please help show how to plot it
-
Pink blocks
for each parent trade - 100 pips away - add to position
separate tree
for each child trade - 10 pips away - add to positionCreate this and share the link for any problems
-
@jstap Thank you, but this is giving too many multiple orders. block 2 as main with 100pips as maximum tp and block 20 as sub 10pips until reach 100pips level and terminate https://fxdreema.com/shared/aTCdzqgRd
-
You have parent trade in both blocks:

-
@jstap Thank you this worked because the order is not more than two at a time and bank profits https://fxdreema.com/shared/qhXOx11oe now i need to stop or terminate the EA at a certain level in profit either by pips or total amount equity balance
-
check profit (unrealised) will act at a set profit, check profit (period of time) will check the profit over time, < let trades be placed, > close all trades, use 2 trees to achieve this.