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


Circular Reference thru StaticVarGet/Set.
Updated: Views / Replies:196 / 0
Created: by LoveenaJyothi 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.

  #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 > > > > Circular Reference thru StaticVarGet/Set.

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Introducing iSystems with Stage 5 Trading

Apr 27

FIO Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

May

Prototyping Python Strategies (part 2) w/Ran Aroussi

Elite only

Ask Me Anything w/Raymond Deux @ NinjaTrader

May 3

An Afternoon with FIO member Softsoap

Elite only
 

Machine Learning & Data Mining Bias w/Kris Longmore @ Robot Wealth

Elite only

Brannigan Barrett (TBA)

Elite only

FIO member Gomi (TBA)

Elite only

FuturesTrader71 (TBA)

Elite only

EasyLanguage Programming w/Chris @ ABC Trading Group

Elite only

Portfolio Diversification w/Brendon Delate

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 08:09 AM
OnBarUpdate Error Object reference not set to an instance of an object ECI Ed NinjaTrader Programming 2 August 6th, 2013 03:59 PM
ninja trader object reference not set to an instance kk240 NinjaTrader Programming 4 December 29th, 2010 10:16 AM
need help :: cant fix :: Object reference not set to an instance of an object Trader.Jon NinjaTrader Programming 9 November 3rd, 2010 10:55 AM
Object reference not set to an instance... dsraider NinjaTrader Programming 5 July 30th, 2010 08:17 AM


All times are GMT -4. The time now is 10:21 PM.

no new posts
Page generated 2017-04-27 in 0.05 seconds with 20 queries on phoenix via your IP 54.80.203.145