Good day to all members of the forum.
My name is Paul and I'm a new member.
I need some help.
I'm trying to complete a strategy but I dont understand wher's the mistake.
The system opens a long or a short position.
This position must be closed the day after at 09.30 am
I wrote this code but it is wrong.
Can You help me find the error, thanks
.......
if Time = 915 and c of data2 <= c [24] of data2 then
setprofittarget (0);
if Time> = 930 and time <1730 then begin
exitlong;
exitshort;
end;
.......
Thank you so much
Paolo
Easylanguage and day after
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Easylanguage and day after
See post #5Good day to all members of the forum.
My name is Paul and I'm a new member.
I need some help.
I'm trying to complete a strategy but I dont understand wher's the mistake.
The system opens a long or a short position.
This position must be closed the day after at 09.30 am
I wrote this code but it is wrong.
Can You help me find the error, thanks
......
if Time = 915 and c of data2 <= c [24] of data2 then
setprofittarget (0);
if Time> = 930 and time <1730 then begin
exitlong;
exitshort;
end;
.......
Thank you so much
Paolo
viewtopic.php?f=16&t=10811
What are your chart's data resolutions?
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
-
- Posts: 4
- Joined: 07 Jan 2014
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Easylanguage and day after
Hello Paolo,
What is the exact difficulty you have with the code?
What exact code does not do what it is intended to do?
What is the exact difficulty you have with the code?
What exact code does not do what it is intended to do?
-
- Posts: 4
- Joined: 07 Jan 2014
Re: Easylanguage and day after
Henry, thank You for help me.
I want to close the position (- long or short - position I have open the day before) the next day at 09.30. But when I enter this command:
if Time> = 930 and time <1730 then begin
exitlong;
exitshort;
end;
This command is not accepted by easylanguage and I can not use this system.
I want to close the position (- long or short - position I have open the day before) the next day at 09.30. But when I enter this command:
if Time> = 930 and time <1730 then begin
exitlong;
exitshort;
end;
This command is not accepted by easylanguage and I can not use this system.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Easylanguage and day after
There are no "exitlong" and "exitlong" commands in PowerLanguage.
Buy and SellShort commands are for opening a position.
Sell and BuyToCover commands are for closing a position.
Complete list of PowerLanguage Keywords can be found at this page under PowerLanguage Keyword Reference section:
https://www.multicharts.com/trading-sof ... /Main_Page
Buy and SellShort commands are for opening a position.
Sell and BuyToCover commands are for closing a position.
Complete list of PowerLanguage Keywords can be found at this page under PowerLanguage Keyword Reference section:
https://www.multicharts.com/trading-sof ... /Main_Page
-
- Posts: 4
- Joined: 07 Jan 2014
Re: Easylanguage and day after
Thanks Henry, I completed the system.
Now I have a new problem, all my system is based on a time frame of 15 minutes but I have to open a new position 10 second before the close of the market..... How I can solve this problem??
Now I have a new problem, all my system is based on a time frame of 15 minutes but I have to open a new position 10 second before the close of the market..... How I can solve this problem??
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Easylanguage and day after
Please find the code example here.Thanks Henry, I completed the system.
Now I have a new problem, all my system is based on a time frame of 15 minutes but I have to open a new position 10 second before the close of the market..... How I can solve this problem??