Jump to content
Come try out our new Arcade we just put up, new games added weekly. Link at the top of the website ×

FunStick

*** Clan Members
  • Posts

    1038
  • Joined

  • Last visited

  • Days Won

    2
  • Donations

    1.00 USD 
  • Points

    981,840 [ Donate ]

Everything posted by FunStick

  1. I like wild's Mickey Mouse Shirt! rofl
  2. Hey everyone I need some help in coding. The language is C++ and Im extremely rusty in fact I suck at programming. Posted below is a code for an automated trading robot for the Foreign Exchange Market using an MT4 Platform (MetaTrader). I believe it was designed for back testing, but I believe it can be used for forward testing, but it needs a code to do trades on live charts. If anyone can help me that would be great. #define MAINSEEK 148 #define BARSIZE 44 // LONG_VALUE + 5 * DOUBLE_VALUE #define SIGNAL_NONE 0 #define SIGNAL_BUY 1 #define SIGNAL_SELL 2 #define SIGNAL_CLOSEBUY 3 #define SIGNAL_CLOSESELL 4 extern double Stop = 15; extern string phase="buy"; extern bool StopLossMode = True; extern int StopLoss = 100; extern bool TakeProfitMode = False; extern int TakeProfit = 0; extern bool UseTrailingStop = False; extern int TrailingStop = 30; extern int MaximumRisk=3; extern int Level1=0; extern int Slippage = 3; extern int MagicNumber = 0; extern int Pips = 5.; extern double Lots = 0.1; int BarCount; int Current; bool TickCheck = True; int handle; bool MainError; int GetTime( int Pos ) { int PosTime; FileSeek(handle, MAINSEEK + Pos, SEEK_SET); PosTime = FileReadInteger(handle); return(PosTime); } bool FindTimePlace( int SearchTime ) { int LeftTime, RightTime, PosTime; int Left, Right, Pos; Left = 0; Right = FileSize(handle) - MAINSEEK - BARSIZE; LeftTime = GetTime(Left); RightTime = GetTime(Right); while ((LeftTime < SearchTime) && (SearchTime < RightTime)) { Pos = (Left + Right) / 2; Pos -= Pos % BARSIZE; if (Pos == Left) break; PosTime = GetTime(Pos); if (SearchTime >= PosTime) { Left = Pos; LeftTime = GetTime(Left); } else // if (SearchTime < PosTime) { Right = Pos; RightTime = GetTime(Right); } } if (SearchTime <= RightTime) { FileSeek(handle, Left + MAINSEEK, SEEK_SET); return(TRUE); } else return(FALSE); } void init() { int handle = FileOpenHistory(Symbol() + Period() + ".hst", FILE_BIN|FILE_READ); if (handle > 0) MainError = FALSE; else { MainError = true; return; } MainError = FindTimePlace(Time[0]); if (!MainError) FileClose(handle); return; } void deinit() { if (MainError) FileClose(handle); return; } bool GetPrices( int& PriceTime, int& PriceLow, int& PriceHigh) { PriceTime = FileReadInteger(handle); FileSeek(handle, DOUBLE_VALUE, SEEK_CUR); PriceLow = FileReadDouble(handle) / Point + 0.1; PriceHigh = FileReadDouble(handle) / Point + 0.1; FileSeek(handle, 2 * DOUBLE_VALUE, SEEK_CUR); if (FileTell(handle) + BARSIZE <= FileSize(handle)) return(TRUE); else return(FALSE); } int GetTimeTrade() { static bool FlagUP = TRUE; static int Min = 999999; static int Max = 0; static int NTime; int ResTime; int PriceTime, PriceLow, PriceHigh; while (TRUE) { if (!GetPrices(PriceTime, PriceLow, PriceHigh)) return(-1); if (FlagUP) { if (PriceHigh > Max) { Max = PriceHigh; NTime = PriceTime; } else if (Max - PriceLow >= Pips) { FlagUP = FALSE; Min = PriceLow; break; } } else // (FlagUP == FALSE) { if (PriceLow < Min) { Min = PriceLow; NTime = PriceTime; } else if (PriceHigh - Min >= Pips) { FlagUP = TRUE; Max = PriceHigh; break; } } } ResTime = NTime; NTime = PriceTime; return(ResTime); } void CloseOrder( int Ticket ) { OrderSelect(Ticket, SELECT_BY_TICKET); if (OrderType() == OP_BUY) OrderClose(Ticket, OrderLots(), Bid, 0); else // (OrderType() == OP_SELL) OrderClose(Ticket, OrderLots(), Ask, 0); return; } int ReverseOrder( int Ticket) { if (Ticket == 0) Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, 0, 0, 0); else { OrderSelect(Ticket, SELECT_BY_TICKET); if (OrderType() == OP_BUY) { OrderClose(Ticket, OrderLots(), Bid, 0); Ticket = OrderSend(Symbol(), OP_SELL, Lots, Bid, 0, 0, 0); } else // (OrderType() == OP_SELL) { OrderClose(Ticket, OrderLots(), Ask, 0); Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, 0, 0, 0); } } return(Ticket); } void System() { static int Ticket = 0; static int NewTime = 0; if (NewTime < 0) return; if (Time[0] < NewTime) return; Ticket = ReverseOrder(Ticket); NewTime = GetTimeTrade(); if (NewTime < 0) CloseOrder(Ticket); } int start() { if (!MainError) return; System(); return; } (This Robot use history from future data, so in live account there is no future data. you can't trade with this ea. see this : bool FindTimePlace( int SearchTime ) { int LeftTime, RightTime, PosTime; int Left, Right, Pos; The trading logic is great, but I am not sure how to code it to where it will trade live on the charts.
  3. Ohhh Fresh meat!! Yummy! Welcome to the family. =]
  4. In the passed few nights, we have been getting a lot of people who like Knifing. I am thinking that we should start a knifing tournament, and have teams that consist of XI and Non XI. Just a friendly knifing tournament. Everyone like that idea?
  5. Hey sweet heart.. Welcome to our Family!!
  6. Holy shit.. wow? My people need to die
  7. Hello czech, welcome to the forums. Always fun playing with you..
  8. Hey welcome to our site.. Glad to see you
  9. One night, one of my female friends and I were having a debate. She felt that it was unfair that a woman is considered a slut and hoe, etc.. when she sleeps with 2 to 4 guys a week or so, where as a man who did that is considered "The Man", a Pimp, etc.. I told her this. " A key that can open many locks is considered the master key. A lock that can be opened by many keys is just a shitty lock" That shut her up real quick. - FunStick>XI<
  10. Aww, Tiny's going to DC!! She will love it! If you and widow are coming I can meet you all there as well. Its only about 2 hours away from me. Anyway, I just donated some loot for tiny! Give her a hug for me..
  11. Happy B day Zoe.. I'll jump out of a cake for you!
  12. One night, Bob Barker was woken up by a loud noise in the kitchen. Bob puts on his robe and slippers, then starts to head down the steps. As he is walking down the steps, he forgets to tie the robe and slips on the robes belt, tumbling down the stairs like a lil bitch. Poor Bob.. He is knocked out cold. And who or whatever that noise was still in the house. After a few hours, Bob awakens in his basement. His hands are cuffed and his feet tied up with rope. He is also spread like a bad habit... Bob is like, WTF?? Trying to shake his way out, but got too tired and gave up. (Poor Bob ) Then disco Lights are turned on, making the basement look like a disco, and then someone.... Turns on some Marven Gaye - Sexual Healing. Bob is thinking, Oh shit, I bet its the wifey doing something kinky.... Then a small sexy looking figure appears.. It is dark so Bob can't tell who it is, but the figure looks like a girl with a nice rack, long hair, slim waste, nice hips.. By that time Bob is droooling like a dog for bacon strips.. As the figure appeared closer and closer, bob gets more and more excited.. Then, the figure whisper's into Bob's ear.. Im going to ride you like you have never been rode before... Then the mystery person unrevials it self. Bob wasn't able to walk for a week. This has been brought to you buy Funstick and friends - Bob's Bed Time Stories! Sweet Dreams Bob.
  13. This thread is going to be bedtime stories for Bob. For those of you who have NO CLUE to why? Its an inside joke a few of us know. Now feel free to please add on to this story. Enjoy
  14. A farmer is sitting in the neighborhood bar getting soused. A man comes in and asks the farmer, "Hey, why are you sitting here on this beautiful day getting drunk?" Farmer: Some things you just can't explain. Man: So what happened that's so horrible? Farmer: Well, today I was sitting by my cow milking her. Just as I got the bucket about full, she took her left leg and kicked over the bucket. Man: Ok, but that's not so bad. Farmer: Some things you just can't explain. Man: So what happened then? Farmer: I took her left leg and tied it to the post on the left. Man: and then? Farmer: Well, I sat back down and continued to milk her. Just as I got the bucket about full, she took her right leg and kicked over the bucket. Man: Again? Farmer: Some things you just can't explain. Man: So, what did you do then? Farmer: I took her right leg this time and tied it to the post on the right. Man: and then? Farmer: Well, I sat back down and began milking her again. Just as got the bucket about full, the stupid cow knocked over the bucket with her tail. Man: Hmmm... Farmer: Some things you just can't explain. Man: So, what did you do? Farmer: Well, I didn't have any more rope, so I took off my belt and tied her tail to the rafter. In that moment, my pants fell down and my wife walked in.....
  15. Every day, we are assaulted by stories of stupid people--many of whom use their stupidity for personal gain. From time to time, though, we hear of those who strive to achieve new levels of stupidity *while* also breaking the law. To these brave men and women--ooops, "women and men"--we present the highest possible honor: entry into the "Stupid-Criminal Hall of Shame." Following are their accounts ... Kentucky (where else?): Two men tried to pull the front off a cash machine by running a chain from the machine to the bumper of their pickup truck. Instead of pulling the front panel off the machine, though, they pulled the bumper off their truck. Scared, they left the scene and drove home. With the chain still attached to the machine. With their bumper still attached to the chain. With their vehicle's license plate still attached to the bumper. South Carolina: A man walked into a local police station, dropped a bag of cocaine on the counter, informed the desk sergeant that it was substandard cut, and asked that the person who sold it to him be arrested immediately. Indiana: A man walked up to a cashier at a grocery store and demanded all the money in the register. When the cashier handed him the loot, he fled--leaving his wallet on the counter. England: A German "tourist," supposedly on a golf holiday, showed up at customs with his golf bag. While making idle chatter about golf, the customs official realized that the tourist did not know what a "handicap" was. The customs official asks the tourist to demonstrate his swing, which he does--backward! A substantial amount of narcotics were found in the golf bag. Germany: Oil of Olay no longer turning the trick for her, a woman decided that she would bathe in the milk of a camel (a modern-day Cleopatra). So she stole a camel from the local zoo (where *else* can you find a camel when you need one?) and transported it back to her house--where she realized that the camel's name was "Otto." Arizona: A company called "Guns For Hire" stages gunfights for Western movies, etc. One day, they received a call from a 47-year-old woman who wanted to have her husband killed. She got 4-1/2 years in jail. Texas: A man convicted of robbery worked out a deal to pay $9600 in damages rather than serve a prison sentence. For payment, he provided the court a check--a *forged* check. He got 10 years. (Location Unknown): A man went into a drug store, pulled a gun, announced a robbery, and pulled a Hefty-bag face mask over his head--and realized that he'd forgotten to cut eyeholes in the mask. (Location Unknown): A man successfully broke into a bank after hours and stole--are you ready for this?--the bank's video camera. While it was recording. Remotely. (That is, the videotape recorder was located elsewhere in the bank, so he didn't get the videotape of himself stealing the camera.) (Location Unknown): A man successfully broke into a bank's basement through a street-level window, cutting himself up pretty badly in the process. He then realized that (1) he could not get to the money from where he was, (2) he could not climb back out the window through which he had entered, and (3) he was bleeding pretty badly. So he located a phone and dialed "911" for help... Virginia: Two men in a pickup truck went to a new home site to steal a refrigerator. Banging up walls, floors, etc., they snatched a refrigerator from one of the houses, and loaded it onto the pickup. The truck promptly got stuck in the mud, so these brain surgeons decided that the refrigerator was too heavy. Banging up *more* walls, floors, etc., they put the refrigerator BACK into the house and returned to the pickup truck only to realize that they locked the keys in the truck--so they abandoned it. (Location Unknown): A man walked into a Circle-K (a convenience store similar to a 7-11), put a $20 bill on the counter and asked for change. When the clerk opened the cash drawer, the man pulled a gun and asked for all the cash in the register, which the clerk promptly provided. The man took the cash from the clerk and fled, leaving the $20 bill on the counter. The total amount of cash he got from the drawer? Fifteen dollars.
  16. Last Day on the Job It was the mailman's last day on the job after 35 years of carrying the mail through all kinds of weather to the same neighborhood. When he arrived at the first house on his route he was greeted by the whole family there, who congratulated him and sent him on his way with a big gift envelope. At the second house they presented him with a box of fine cigars. The folks at the third house handed him a selection of terrific fishing lures. At the fourth house he was met at the door by a strikingly beautiful woman in a revealing negligee. She took him by the hand, gently led him through the door, and led him up the stairs to the bedroom where she blew his mind with the most passionate love he had ever experienced. When he had had enough they went downstairs, where she fixed him a giant breakfast, eggs, potatoes, ham, sausage, blueberry waffles, and fresh squeezed orange juice. When he was truly satisfied she poured him a cup of steaming coffee. As she was pouring, he noticed a dollar bill sticking out from under the cup's bottom edge. "All this was just too wonderful for words," he said, "but what's the dollar for?" "Well," she said, "last night, I told my husband that today would be your last day, and that we should do something special for you. I asked him what to give you." He said, "Fuck him, give him a dollar." The lady then said, "The breakfast was my idea."
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.