Hi,
Can anyone help, please if it is possible to activate a trade during the current bar, if the condition is met (for example if you have a higher high than the previous bar)? I can only find “next bar open”.
Kind regards
George
Thanks Eric!
Could you explain in more detail how this command is!? Buy at “high[0] is greater than high[1]”STOP?
Sorry, if it’s too naive…
George
I’ve made a try, thanks.
Tha command was good, I mean it was executed. But it brought the same result like buy at market. And it activates the trade one bar later
George
Thanks Eric! Could you explain in more detail how this command is!? Buy at “high[0] is greater than high[1]”STOP? Sorry, if it’s too naive… George
This command makes no sense, since it means BUY AT true/false STOP, where true/false is a logical datum not a price!
You can write BUY AT HIGH[0] STOP or BUY AT HIGH[1] STOP/LIMIT.
Roberto
Dear Roberto,
It is interesting! I use the same code in the screener and in the trading system. I ask for green arrow in the screener if the condition is met, and the arrow is placed under the right bar. I coded ‘BUY at HIGH[1] STOP’ but it is still executed one bar later (blue arrow made by the system), than the green arrow.
According to the strategy ‘bar1’ is the setup bar, ‘bar0’ is the entry bar if the entry bar has one tick higher high than the setup bar. This is a short term strategy, so it is important to act when it has to.
And the system acts one bar after the entry bar.
Any idea?
Thank you
Bar[0] is the setup bar, the entry bar cannot be referenced till it closes.
Screener behaves differently because it scans the market at any time, even when a candle is being built, while Proorder runs strategies only when a candle closes, right before the new one opens, then it takes a breath till it closes and so on…
EricParticipant
Master
Try something like this
the 0.6 is for the spread (1 point in this case) because the chart in prorealtime shows the price and its bid and ask that execute the trade
and another thing to be aware of is the minimum stop distance , if proorder try to place a stop to buy to close to the pevious high (or something else) it will be rejected and the tradingsystem will be stopped and needs to be restarted again
donh = HIGHEST[1](HIGH)+0.6* pipsize
IF NOT LongOnMarket THEN
BUY 1 Contracts AT donh STOP
ENDIF
donl = LOWEST[1](LOW)-0.6* pipsize
IF LongOnMarket THEN
SELL AT donl STOP
ENDIF
EricParticipant
Master
About this minimum stop distance
a stop order is always checked and maybe moved at the end of the bar and be placed at the new bar open (the current level are valid 1 bar)
so if the current price (at the end of the bar) is to close to the new stop level it will be rejected
Thank you Eric, I will try this. My point is that the strategy is expected to be calculated on each incoming tick, and not only at the close of the certain bar. For example if you’re on an hourly timeframe, and the condition is met in the 5th minute, the trade should be executed right then and not at the next bar open. If I mean well Roberto’s words ProOrder is able to run strategies when a bar is closed.
Thanks again
George
Calculation will not be made at each tick, only one time at Close.
Thanks for the confirmation Nicolas! Maybe in the future?
Yes! It should take place this year hopefully.