Gamestudio Links
Zorro Links
Newest Posts
Alternative to Stooq for Zorro S
by cwford. 10/09/26 21:13
Stooq now requires an API key
by cwford. 10/08/26 23:27
ZorroGPT
by TipmyPip. 10/06/26 05:32
Purchase A8 full licence version
by jcl. 10/05/26 12:12
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (AndrewAMD, Quad), 23,826 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
JimSimons, julienp, julienper, KelleyAbbey, Yopachi
19246 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,835
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,835
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