Opening does not work

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29345 quote
    arcane
    Participant
    Senior

    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
    
    
    #29395 quote
    JC_Bywan
    Moderator
    Master

    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:

    1. 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.
    2. 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.
    #29432 quote
    arcane
    Participant
    Senior

    thank you for the answer.

    I understood.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Opening does not work


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
arcane @arcane Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by arcane
8 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/21/2017
Status: Active
Attachments: No files
Logo Logo
Loading...