Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Ayumi), 903 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
EnterLong with different BarPeriod #475714
01/04/19 18:01
01/04/19 18:01
Joined: Apr 2018
Posts: 37
S
sdelatorre Offline OP
Newbie
sdelatorre  Offline OP
Newbie
S

Joined: Apr 2018
Posts: 37

I have different AR ( a big difference) if I change the BarPeriod.

If I change the BarPeriod=60 and I put BarPeriod=1 is very very different....I don't understand it because I enter the trade to the same hour.

Why is the difference? And if the reason is the bar ....how I can select the current price to an specifi hour regardless of Barperiod?


My code:
function horas(int timezone,int inicio, int final){

if(lhour(timezone) == inicio && minute(timezone)==0) { enterShort(); }

if(lhour(timezone) == final && minute(timezone)==0){ exitShort(); }

}



function run() {
set(PLOTNOW+PARAMETERS+TICKS);
StartDate = 2010;
EndDate = 2018;
BarPeriod = 60;
}

Thanks in advance

Re: EnterLong with different BarPeriod [Re: sdelatorre] #475715
01/04/19 18:35
01/04/19 18:35
Joined: Feb 2017
Posts: 1,731
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,731
Chicago
run() does not have any entry logic.

Please post your entire script.

Re: EnterLong with different BarPeriod [Re: AndrewAMD] #475723
01/05/19 06:35
01/05/19 06:35
Joined: Apr 2018
Posts: 37
S
sdelatorre Offline OP
Newbie
sdelatorre  Offline OP
Newbie
S

Joined: Apr 2018
Posts: 37


The run only has the function :

horas(WET,7,13);


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1