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

[amibroker] staticvar query


  • Date: Sat, 5 Dec 2009 19:20:15 +0530
  • From: "Pankaj Sharma" <psharma@xxxxxxxxxxxxxx>
  • Subject: [amibroker] staticvar query

PureBytes Links

Trading Reference Links



I am trying to set a variable LongTrade to 1 for the first buy signal and stay zero till the next sell signal. I cannot use exrem, as my sell signal is dependant on querying the indicators when the first buy signal occurred.

 

StaticVarSet("LongTrade",IIf(Buy AND Nz(StaticVarGet("LongTrade"))==0,1,0));

 

But LongTrade is behaving exactly like the Buy array.

 

Example, if my buy array is like 1,1,1,0,0,1,1  the LongTrade variable is also 1,1,1,0,0,1,1 – I would expect it to be 1,0,0,0,0,0,0 till sell signal occurs at which time it would be ready to be set to 1 by the next buy signal.

 

Am I making an elementary error here? Appreciate directions.

 

Thanks,

 

Pankaj

 



__._,_.___


**** 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

__,_._,___