Circular Reference thru StaticVarGet/Set. - AmiBroker | futures.io
futures.io futures trading
 

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > AmiBroker


Circular Reference thru StaticVarGet/Set.
Started:November 4th, 2016 (04:57 PM) by LoveenaJyothi Views / Replies:59 / 0
Last Reply:November 4th, 2016 (04:57 PM) Attachments:0

Welcome to futures.io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.


You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike
     

Reply
 
Thread Tools Search this Thread

Circular Reference thru StaticVarGet/Set.

Old November 4th, 2016, 04:57 PM   #1 (permalink)
Trading Apprentice
Mangalore,India
 
Futures Experience: Intermediate
Platform: Amibroker,NEST
Favorite Futures: Crude,Currency Futures
 
Posts: 2 since Jun 2016
Thanks: 2 given, 0 received

Circular Reference thru StaticVarGet/Set.

Is Circular Reference possible in AFL ?
Tried StaticVarGet & Set , got desired results along with a lot of garbage AND utterly UnReliable in Live Trade bcoz everytime Explore/Scan/Backtest Button Clicked --> the AFL gives Different results each time.

Sample codes:
1.Basic Code
 
Code
Buy=Buycondn;
Sell=SellCondn dependent on BuyCondn;
Short=ShortCondn OR Ref(Sell,-1);
Cover=CoverCondn dependent on ShortCondn;
//Wud love to define Buy=BuyCondn OR Ref(Cover,-1),  but obviously will not work, so tried the below code
2.Modified Code.
 
Code
TempCvr=StaticVarGet("TempCvr");
Buy=Buycondn or TempCvr;
Sell=SellCondn dependent on BuyCondn;
Short=ShortCondn OR Ref(Sell,-1);
Cover=CoverCondn dependent on ShortCondn;
TempCvr= Ref(Cover,-1) ;
StaticVarSet("TempCvr",TempCvr,persist=True);
This Modified code gives, as desired, the Buy Signals @ bar next to Coverbar on chart , but in Analysis window , for every click it gives a diffrent result, especially if AllSymbols or more than 1 symbol is selected,
if CurrentSymbol is selected, the Results are Stable after the second or third clicks.

Plz Note: the ExRems are duly placed, no question of excess signals.

Any Insights by Respected Seniors/Coders wd be Highly Appreciated.

Thank You all.
LJ.

Reply With Quote
     

Reply



futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > AmiBroker > Circular Reference thru StaticVarGet/Set.

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

Trading Technologies: ADL hands-on

Dec 13

Normal webinar schedule resumes after the holidays

January

Ernie Chan: Risk Management

Elite only

Dedicated Trading Servers: Advantages/Disadvantages w/sam028

Elite only

An Afternoon with FIO member Massive I

Elite only

Leo Murphy: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Object reference not set to an instance of an object. gomad NinjaTrader Programming 11 December 22nd, 2014 09:09 AM
OnBarUpdate Error Object reference not set to an instance of an object ECI Ed NinjaTrader Programming 2 August 6th, 2013 04:59 PM
ninja trader object reference not set to an instance kk240 NinjaTrader Programming 4 December 29th, 2010 11:16 AM
need help :: cant fix :: Object reference not set to an instance of an object Trader.Jon NinjaTrader Programming 9 November 3rd, 2010 11:55 AM
Object reference not set to an instance... dsraider NinjaTrader Programming 5 July 30th, 2010 09:17 AM


All times are GMT -4. The time now is 06:43 AM.

Copyright © 2016 by futures.io. All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
 
no new posts
Page generated 2016-12-10 in 0.07 seconds with 19 queries on phoenix via your IP 54.166.37.177