works a treat thank you again
ICCE. Bemac's Fib. Reverse Engineered 2,027 replies
Can a successful system be reverse engineered? 14 replies
Reversed Engineered Trading System 27 replies
Meta Trader .. fixeing fib when scrolling 2 replies
Short Term Trades and Fib 1 reply
DislikedI am amazed at what has happened here! In just a week or so, initiated by a call for assistance, talent from known and unknown places arrived....gathered specs....designed engineering models....knocked out prototypes.....and presented candidates for production models! Wow....simply, WOW!!!!!!
And based upon the programming talent involved and the user features provided, any production model has just gotta have a User Manual!
By the way, I tried the last posted (Bemac ICCE eights1.12) and compiled it for assurance. I got a message that "start"...Ignored
DislikedSave the position to a global, then read it back. It should work even if everything is in init. Rgrds.Ignored
//------------------------------------------------ ChartPeriod=GlobalVariableGet("FibCP"); if (ChartPeriod==0) //if FibCP doesn't exist { ChartPeriod=1; //set a default GlobalVariableSet("FibCP",ChartPeriod); } if (ChartPeriod!=Period()) // Time Period was changed { HighPrice=GlobalVariableGet("FibHP"); LowPrice=GlobalVariableGet("FibLP"); if (HighPrice==0) HighPrice=Ask; // if null assign a default if (LowPrice==0) LowPrice=Bid; ObjectSet(FibObject[31], OBJPROP_PRICE1, HighPrice); //set fib ObjectSet(FibObject[32], OBJPROP_PRICE1, LowPrice); GlobalVariableSet("FibCP",Period()); // set period in case it changes ChartPeriod=Period(); // update local var } // at this point you can now go retrieve the positions as normal // all fibs are calculated from high low so you only need to know 2 var's HighPrice=ObjectGet("Fib31", OBJPROP_PRICE1); // get the fib pos's LowPrice=ObjectGet("Fib32", OBJPROP_PRICE1); GlobalVariableSet("FibHP",HighPrice); //set them for next time round GlobalVariableSet("FibLP",LowPrice); .... draw calculated fib % levels.
DislikedFirst time through the globals will return zero, eliminating the catch 22.
The example below remembers when the timeframe is changed, so the fib stays in place when the user changes the timeframe, tested working.
I'm sure you could apply this to your box, its an object too. And it shouldn't matter if its in init, my code below also gets de-init'ed and init'ed every time too, every time the time period is changed. Same problem.
Just trying to help... i admit this was a tricky one to figure out.
The only thing your going to lose by running...Ignored
Dislikedcan't edit previous post so i'll finish the thought....
so if all the code were in start()
and the market is closed
and you add this:
start()
into your init
then everytime you right click and hit refresh...
it triggers the start, which triggers the drawdelay, which paints the indi(s) and the data.
if the data is tied into candle[0] or better yet EndDraw ( a floating zero) then there will be a movable reporting point. if chartautoscroll is turned on then all references hold at one point, zero.
So in definition and terms of OOP,...Ignored
DislikedLast thought.
So if some super duper EA were to eat up all the money, then the entity becomes the lesson. We're all way better off than 100 years ago, so its not about the money then, its now about, the lesson... ok done.Ignored