Good evening,
I need help with a program.
Time Unit: Daily
Support: actions.
I would like to open a position at the opening according to the candle of the previous day but the program does not open a position.
Thanks if anyone can help me.
c1= close > open
c2= close < open
ordre= Time = 090000
if c1 and Not OnMarket and ordre then
BUY 10000 cash roundedup at market
EXITSHORT AT MARKET
endif
if c2 and not OnMarket and ordre then
SELLSHORT 10000 cash roundedup at market
SELL AT MARKET
endif
Hi,
I would say your program doesn’t open a position at all because “time” keyword is not “what time is it inside the candle”, it is the closing time of a candle in the timeframe displayed. Therefore if you are as you say in a daily timeframe, none of your daily candle will ever have a time value = 090000, and the orders will not be executed because your “ordre” condition will never be =1.
Depending on if you are familiar or not with differences between probuilder and proorder keywords (we all learn it one day or another), then there are 2 possibilities:
- Either your intention was to build a probuilder indicator showing when to buy or sell (we are here in “pro-builder support” forum), not a pro-order trading system, then you can’t use “buy” or “sell” pro-order-specific keywords, you need to create a variable (for example +1 for buy or -1 for sell) and a “return” line returning this variable.
- Or building a trading strategy is what you really want, using buy and sell (and sellshort and exitshort), then no need to create a return line, you can keep the buy and sell keywords, pro-order compatible, and I need Nicolas to move this topic to the “support pro-order” forum, I don’t seem to have enough admin access to do it myself.
thank you for the answer.
I understood.