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 🙂
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
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