Turn on/ off systems at a specific time

Questions about MultiCharts and user contributed studies.
vivienne
Posts: 3
Joined: 26 Apr 2007

Turn on/ off systems at a specific time

Postby vivienne » 13 May 2007

I would like to know is there a way to turn on / off the signals at a specific time.. either using the EL scripts, or any settings of MC Support this?

THANKS

User avatar
ABC
Posts: 524
Joined: 16 Dec 2006
Has thanked: 111 times
Been thanked: 295 times
Contact:

Re: Turn on/ off systems at a specific time

Postby ABC » 13 May 2007

I would like to know is there a way to turn on / off the signals at a specific time.. either using the EL scripts, or any settings of MC Support this?

THANKS


vivienne,

you can program your systems in PowerLanguage that they will only trade during a specific time and stop trading outside of this time period.
That way the system is still active, but it's not taking any trades due to the time conditions.
That's probably the easiest way.

Regards,

ABC

vivienne
Posts: 3
Joined: 26 Apr 2007

Postby vivienne » 13 May 2007

HI ABC,

thx for telling me that!!!

would you mind posting the sample scripts for me ??

thx a lot~

User avatar
ABC
Posts: 524
Joined: 16 Dec 2006
Has thanked: 111 times
Been thanked: 295 times
Contact:

Postby ABC » 15 May 2007

I can give you an example, that should get you started:

Code: Select all


Inputs:
StartTime(930),
EndTime(1614);

{Replace the comment with your variables and system calculations}

If Time > StartTime and Time <= EndTime then begin
//put your Entries here
end;


That would be a very basic approach and the system will only take entries during your specified time period. You should at least add something to close all open positions if the time > EndTime (or at End of day, whatever you want), because otherwise you might end up with a system in the market although your EndTime condition is reached.

Regards,

ABC


Return to “MultiCharts”