Instruction to exit trade not working

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #190120 quote
    pdrhpdrh
    Participant
    Average

    I have an algo that shorts the DJI but I do not want the trade to be open over the weekend .

    I have this instruction to exit the trade on friday market close but it is not working .

    Any advoce please

    IF ONMARKET and OPENDAY=5 AND TIME =160000 THEN
    EXITSHORT at MARKET
    ENDIF

    #190121 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    It should work on any timeframe whose candle closes at 160000.

    If you use a TF not closing at that time it will be ignored.

    Try replacing =160000 with >=160000.

    pdrh thanked this post
    #190123 quote
    pdrhpdrh
    Participant
    Average

    I was using it on a 1 Hour TF .>= works

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Instruction to exit trade not working


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
pdrh @pdrh Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by pdrhpdrh
4 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 03/17/2022
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...