Hello everyone,
I’m new to probuilde and would like to understand the very basic concepts of the language.
I’d like to try two very simple strategies:
1. buy at open and sell at close the same day
2. buy at open of today and sell at the open of tomorrow
In both cases, the buy i think can be something like:
IF NOT LongOnMarket THEN
BUY 1 CONTRACTS AT MARKET
ENDIF
However for closing the position i’m not really sure how to make it. Can someone please help me with this?
Thanks in advance
IF LongOnMarket THEN
Sell AT MARKET
ENDIF
That’s all you need to close a trade the next bar after opening.
Thank you!
Any idea on how to sell the same day at close (of course this should be before close as after close the market is supposed to be closed also)?
Strategies, until the new version is released (hopefully by the end of this year), are executed when a candle closes. No way to work it around!
Hi guys, is it now possible to enter or exit a trade at the close of day with the new version 11.1?
You ALWAYS have been able to enter when a candle closes.
No need for v11.
You ALWAYS have been able to enter when a candle closes.
Not strictly true Roberto. You have always been able to decide to enter a trade at the close of a candle but the actual opening always takes place at the open of the next candle.
Now with MTF we can now decide to enter a trade 1 second before the close of a higher time frame candle.
Yes, but it can already be done. MTF is not tied to v11.
An example of MTF being used to open 1 second before the close of the 1 hour candle. This can be used to avoid gaps between close and open.
timeframe(1 hour)
c1 = (your entry conditions)
timeframe(1 second)
if minute = 59 and currentsecond = 59 and c1 then
buy 1 contract at market
endif
ck2016 was asking to enter when a daily candle closes, not 1 second earlier!
MTF is not tied to v11.
Sorry Roberto – I missed the important point that you were commenting about v11!