Auto back test

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

    Coding query

    What code do I require if = I want my current trade to close before another trade is opened? What I am finding in my back testing ‘order list’ is that I get multiple triggers. I only want to trigger a new trade entry once the prior trade has been closed by either my stop or take profit target.

    Thank you

    Chris Wilson

    #70824 quote
    robertogozzi
    Moderator
    Master

    When you test conditions to enter a trade you should add the keyword ONMARKET to test whether you already have, or don’t have, any open trade

    IF MyConditions AND Not OnMarket THEN
       BUY/SELLSHORT....
    ENDIF

    also, you may add at the very beginning of your code (where DEFPARAMs need to be located)

    DEFPARAM CumulateOrders = false

    you can use both.

    #70826 quote
    ChrisNYE
    Participant
    Senior

    Thank you – I just saved this in my template

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

Auto back test


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
ChrisNYE @chrisnye Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/19/2018
Status: Active
Attachments: No files
Logo Logo
Loading...