// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
maxdailyprofit=20000
maxdailyloss=2
once tradeallowed=1
if intradaybarindex=0 then
myprofit=strategyprofit
tradeallowed=1
endif
if strategyprofit>=myprofit+maxdailyprofit or strategyprofit= noEntryBeforeTime
// Prevents the system from placing new orders to enter the market or increase position size after the specified time
noEntryAfterTime = 173000
timeEnterAfter = time = indicator2[1])
c2 = (indicator1 > 60)
IF tradeallowed=1 and c1 and c2 and timeenterbefore and timeenterafter THEN
BUY 0.5 CONTRACT AT MARKET
ENDIF
// Conditions to enter short positions
indicator3 = RSI[2](close)
indicator4 = RSI[2](close)-15
c3 = (indicator3 <= indicator4[1])
c4 = (indicator3 < 40)
IF tradeallowed=1 and c3 and c4 and timeenterbefore and timeenterafter THEN
SELLSHORT 0.5 CONTRACT AT MARKET
ENDIF
SET STOP TRAILING 2.5
I have rarely seen posts with so many errors and disrespect at one time!
Please bear in mind this is a community with its own rules, please respect them and the people who live on them!
1. you never answered a question that someone asked you replying to another duplicate post like this! People offer their help, respect them! You won’t punch rescuers when an ambulance arrives to help you!
2. do not double post, this will make things worse and answers more difficult to find!
3. use meaningful titles, not generic help requests!
4. use the correct support forum!
5. use the “Insert PRT code” button!
6. add a question. what shall we do with your code!?!?
Being a newbie isn’t enough to excuse you, you may take your time to know what roads and traffic are before trying to engage a crossing!
I just deleted another duplicate.
Please stop posting the same question, there are already TWO post of yours around, isn’t that enough for 0.5 questions? (1 question spread over two posts),