Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 17,605 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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,806
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

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