Play videoPlease edit your post.
For large amounts of code, attach it.
- Read the docs: DateTime is the number of SECONDS.
extern int delaytime = 400 // external variable (minutes to delay trades) : // && (timecurrent()) > (lastsell + delaytime) What is the sum of 2 cats and 3 cars? && (timecurrent()) > (lastsell + delaytime * 60) //insert this line into sell conditions
thanks, i just edited the post and added the *60 .
i still get heaps of errors, if i slowly work through all the errors do you think it will work?
i just dont want to spend hours and hours getting rid of all the errors only to find my code doesnt make sense,
theres 45 errors and they all are on the lines i added in which makes me think i havent formatted it properly, i would assume it would be an easy fix for an experienced EA writer/coder/programmer
thanks, i just edited the post and added the *60 .
i still get heaps of errors, if i slowly work through all the errors do you think it will work?
i used TimeCurrent() in the code, and yes i declared all variables.
i just get stupid errors that make no sense to me.... for example, the folling line of code:
&&(( TimeCurrent ) > (lastbuy+(delaytime * 60))
i get this : '&&' unexpected token (first two charcters)
'(' unexpected token (third character)
'>' semicolon expected
'>' unexpected token
'(' unexpected token (before lastbuy)
'+' assignment expected
'(' unexpected token (after +)
'*' assignment expected
'60' unexpected token
everything except for the variables seems to be wrong. ive read the docs about unexpected tokens and all it said was that maybe my variables were spelled wrong or conflict with reserved words.
if i remove all the parentesis then those errors go away and the othwers remain, but in my mind it doesnt really make sense with out them.
i am still hunting for answers elswhere but im still lost as also..

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I would like the EA ,when placing a trade to store (timecurrent) as a variable (lastsell) or (lastbuy)
and then to call these variables and an external (delaytime) variable as part of the open trade logic.
heres what i came up with:
extern int delaytime = 400 // external variable (minutes to delay trades)
datetime lastsell ; // declare other variables( these will be the
datetime lastbuy ; // time of the last buy and sell trades)
&& (timecurrent()) > (lastsell + (delaytime*60)) //insert this line into sell conditions
&&(timecurrent()) > (lastbuy + (delaytime*60)) // insert this line into buy conditions
and these commands after buy order is placed...
(timecurrent) = lastbuy // after the buy order is placed
(timecurrent) = lastsell //after the sell order is placed
anyways ive entered these line into the code and i get alot of errors and cant even compile it to test, i dont even know if this code is on the right track or completely wrong altogether. please can someone take a quick look at it and tell me where im going wrong? i dont expect it to be done for me but im a bit lost.
attached is complete EA after i have added these lines into it.