Hey team,
i cant seem to get the strategy builder to do what I want.
I want it to execute the trade if the chart moves x points from the opening of a candle in either direction. the trade is to be executed in the same direction as the movement. for example, the 10 am candle opens at 4500 when it gets to 4502.5 i want to it buy or when it gets to 4497.5 i want it to sell. Obviously, it will need to program SL and TP’s also.
i understand it will need to be a tick-based strategy that executes before the candle closes but couldn’t figure out the basic of getting the Strat builder to execute after a time and price movement
Any help would be greatly appreciated!!
Beaker
The problem is that to place an order on the 10am opening price, you have to wait for this candlestick to close.
Your code is therefore based on the candlestick closing just before 10:00, not the one that opens at 10:00, but it is indeed the simplest.
On the other hand, you’ve reversed the level required for buying and selling + not the notion of a point, which I think is more appropriate:
c1 = time =100000
IF c1 THEN
BUY 1 SHARES AT close + 2.5*pointsize stop
ENDIF
// Conditions pour ouvrir une position en vente à découvert
IF c1 THEN
SELLSHORT 1 SHARES AT close - 2.5*pointsize stop
ENDIF
SET STOP PLOSS 10
SET TARGET PPROFIT 10