Skip first entry in system

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #45759 quote
    PaulPaul
    Participant
    Master

    Hi I ran into a problem with coding. Hopefully someone has an answer for it.

    detector is always -1 or 1

    previous intraday has a short position based on detector -1.

    It has stops attached.

    I cancel the order in the evening to make changes.

    At the opening because detector is still -1 it enters immediately short with different stops.

     

    If I take profit/loss on a position it supposed to re-enter based on detector.

    if not shortonmarket and detector = -1 and (detector[1] = 0 or detector[1] = 1) then

    Only, I want to skip the first entry when a system goes active. Then have always a position based on the next opposite detector 1 or -1.

    Is there a solution for this?

    Thanks,

    Paul

    #46090 quote
    NicolasNicolas
    Keymaster
    Legend

    Hi Paul, in order to help you with speed and efficiency, I suggest you to post your code, thank you.

    #46182 quote
    PaulPaul
    Participant
    Master

    I found that the easiest solution is the best.

    Just close at end of day. That’s preferable.

    Besides use a extra indicator to create a signal so it doesn’t enter at the opening.

    I posted the code in the strategies as it looks interesting.

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

Skip first entry in system


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Paul @micky75d Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by PaulPaul
9 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/08/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...