[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] referencing code



PureBytes Links

Trading Reference Links



i am trying to call a variable in the code that gets set later on in the code, i see i can't do that. so i set the variable to 0. the problem is that the variable later on gets set to 1 and I want to call the variable when it is set to 1 and I can't seem to do that. 

basically looks like this 

global Shorton;
Shorton=0;
Buy = (BarsSince(signalBar) < waitPeriod)  Shorton==0;
 ..............
//later on in code
shorton=1;
the problem is that later on sometimes the shorton gets set to 1. which is what I want the buy code to reference. but it automatically references the shorton as 0 because that is what it is set at the beginning. 
I also can't put the buy code after the shorton is set, it will screw up my code for the short side.

Is there anyway to call the value when it is 1 and not 0 

I am using an intraday chart. 
can anyone help me???


__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___