Hello, im trying to code a sytsem on timeframe 30min but i don’t want it to open more than one trade per day,
so i tried to use a multitimeframe on daily timeframe section by setting something like ” not tradeindex =0″ in the conditions of the orders because it should return the index of the bar of the last trade (therefore it is 0 if he has already opened a trade today) but it doesn’t work.
Use this variable (OTD) as an additional condition to enter a trade:
1
OTD=(Barindex-TradeIndex(1)>IntradayBarIndex)// IntradayBarIndex < (Barindex - TradeIndex(1)) limits the (opening) trades till 1 per day (OTD One Trade per Day)
Example:
1
2
3
4
5
6
7
Otd=(Barindex-TradeIndex(1)>IntradayBarIndex)// IntradayBarIndex < (Barindex - TradeIndex(1)) limits the (opening) trades till 1 per day (OTD One Trade per Day)
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue