Enter 1 trade per day, either long or short, as soon as “X” pips are reached

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #188301 quote
    davidevece
    Participant
    New

    HI

    I am using the simplified creation tool to build the automated trade. However there are a couple of things I am unable to modify as the options are limited, unless I modify the code.

    Therefore, I was wondering if someone can help me to implement and adjust my code adding two elements:

    • The first is having one trade per day
    • The second is entering only one trade either short or long, as soon as a specific number of pips is reached.

    Can someone give me a hand with it?

    Thanks in advance 🙂

    #188303 quote
    robertogozzi
    Moderator
    Master

    As you did not mention fromn where thos pips are to be calculated, I will use a moving average.

    OTD (One Trade per Day) is used to trade only once per day.

    OTD = (Barindex - TradeIndex(1) > IntradayBarIndex)
    Sma = average[20,0](close)
    Gap = abs(close - Sma)
    IF OTD AND Not OnMarket AND Gap >= 20*PipSize THEN
       IF close > Sma THEN
          BUY 1 Contract at Market
       ELSIF close < Sma THEN
          SELLSHORT 1 Contract at Market
       ENDIF
    ENDIF
    SET TARGET pPROFIT 600
    SET STOP   pLOSS   200
    //graph OTD
    //graph Gap >= 20*PipSize coloured (255,0,0,255)
    //graphonprice Sma
    #188321 quote
    davidevece
    Participant
    New

    Many Thanks indeed Roberto,

    To further clarify my query do you think is possible to take this conversation elsewhere – Is there a private messaging area where I could write you ?

    Thanks

    #188328 quote
    robertogozzi
    Moderator
    Master

    You should ask Nicolas at https://www.prorealcode.com/contact/.

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

Enter 1 trade per day, either long or short, as soon as “X” pips are reached


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
davidevece @davidevece Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by robertogozzi
4 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/15/2022
Status: Active
Attachments: No files
Logo Logo
Loading...