1 entry long for day  [SOLVED]

Questions about MultiCharts and user contributed studies.
tradingest
Posts: 283
Joined: 05 Dec 2014
Location: Italy
Has thanked: 53 times
Been thanked: 3 times

1 entry long for day  [SOLVED]

Postby tradingest » 30 Oct 2016

Hi all,

how I can write the code to entry 1 time long for day?

Currently I use this code but doesn't work as I want because I can have 2 entries for day, 1 long and 1 short

Code: Select all

EntriesToday(Date) = 0

tradingest

tony
Posts: 420
Joined: 14 Jun 2013
Has thanked: 30 times
Been thanked: 81 times
Contact:

Re: 1 entry long for day

Postby tony » 30 Oct 2016

I use the following

Code: Select all

IF Date <> Date[1]

Then
var1 = totaltrades // Holds var1 value at the start of each day
var2 = var1 - totaltrades

AND var2 < 1 // requires that no other trades have been taken for the current day

Then Begin
The above works but you need to declare your variables first.

On another note, you need help programming or need to spend more time learning on your own. The forum is happy to help each other with problems / questions from time to time, but you seem to be posting so many questions, we are essentially doing almost all of your programming for you.

As harsh as this may sound, that's not my intention. The road of a programmed trader is long and arduous. It requires taking time to first fully understand the language you are using to code which in many cases takes a bit of time and a lot of trial and error.

tradingest
Posts: 283
Joined: 05 Dec 2014
Location: Italy
Has thanked: 53 times
Been thanked: 3 times

Re: 1 entry long for day

Postby tradingest » 30 Oct 2016

Hi Tony,

thanks for reply but my quesitons are for all. If not interested you can don't answer.
The forum serves to reduce the learning curve and of mutual benefit.

All questions are utility also for community.

thanks again


Return to “MultiCharts”