Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

sunilrohira

Members
  • Content Count

    88
  • Joined

  • Last visited

Everything posted by sunilrohira

  1. //+------------------------------------------------------------------+ //| SnakeInBorders.mq4 | //| "ÈÍÄÈÊÀÒÎÐÛ ÄËß ÑÀÌÎÎÁÌÀÍÀ" | //| Bookkeeper, 2006, yuzefovich@gmail.com | //+------------------------------------------------------------------+ #property copyright "" #property link "" //+------------------------------------------------------------------+ #property indicator_separate_window #property indicator_buffers 4 #property indicator_color1 Lime #property indicator_color2 Red #property indicator_color3 Lime #property indicator_color4 Red //---- extern int cPeriod=24; //---- double ForceUp[]; double ForceDown[]; double ResistanceUp[]; double ResistanceDown[]; double Mart[]; //---- double Snake_Sum, Snake_Weight, Snake_Sum_Minus, Snake_Sum_Plus; //---- int init() { int draw_begin; double indperiod,val1,val2; string CommentStr; draw_begin=3*cPeriod; IndicatorBuffers(5); SetIndexBuffer(0,ForceUp); SetIndexBuffer(1,ForceDown); SetIndexBuffer(2,ResistanceUp); SetIndexBuffer(3,ResistanceDown); SetIndexBuffer(4,Mart); SetIndexStyle(0,DRAW_HISTOGRAM,EMPTY,2); SetIndexStyle(1,DRAW_HISTOGRAM,EMPTY,2); SetIndexStyle(2,DRAW_HISTOGRAM); SetIndexStyle(3,DRAW_HISTOGRAM); SetIndexStyle(4,DRAW_NONE); SetIndexLabel(2,NULL); SetIndexLabel(3,NULL); SetIndexLabel(4,NULL); SetIndexDrawBegin(0,draw_begin); SetIndexDrawBegin(1,draw_begin); SetIndexDrawBegin(2,draw_begin); SetIndexDrawBegin(3,draw_begin); SetIndexDrawBegin(4,draw_begin); indperiod=1.0*cPeriod*Period(); if(indperiod<60) { CommentStr=DoubleToStr(indperiod,0); CommentStr=" M"+CommentStr+", FORCE UP -DOWN "; } else { indperiod=indperiod/60; if(indperiod>=24) { val1=MathAbs(MathRound(indperiod/24)-indperiod/24); if(val1<0.01) { CommentStr=DoubleToStr(indperiod/24,0); CommentStr=" D"+CommentStr+", FORCE UP -DOWN "; } else { CommentStr=DoubleToStr(indperiod/24,1); CommentStr=" D"+CommentStr+", FORCE UP -DOWN "; } } else { val1=MathAbs(MathRound(indperiod)-indperiod); if(val1<0.01) { CommentStr=DoubleToStr(indperiod,0); CommentStr=" H"+CommentStr+", FORCE UP -DOWN "; } else { CommentStr=DoubleToStr(indperiod,1); CommentStr=" H"+CommentStr+", FORCE UP -DOWN "; } } } IndicatorShortName("SnakeInBorders"+CommentStr); return(0); } //---- void deinit() { } //---- int start() { int FirstPos, ExtCountedBars=0,i; if(Bars<=50) return(0); if(cPeriod<21) return(0); ExtCountedBars=IndicatorCounted(); if (ExtCountedBars<0) return(-1); if (ExtCountedBars>0) ExtCountedBars--; FirstPos=Bars-ExtCountedBars-1; if(FirstPos>Bars-cPeriod-7) { FirstPos=Bars-cPeriod-7; Mart[FirstPos+cPeriod]=SnakeFirstCalc(FirstPos+cPeriod); for(i=FirstPos+cPeriod-1;i>FirstPos;i--) SnakeNextCalc(i); } Snake(FirstPos); return(0); } //---- void Snake(int Pos) { int i; if(Pos<6) Pos=6; Mart[Pos]=SnakeFirstCalc(Pos); Drawing(Pos); Pos--; while(Pos>=5) { Mart[Pos]=SnakeNextCalc(Pos); Drawing(Pos); Pos--; } while(Pos>0) { Mart[Pos]=SnakeFirstCalc(Pos); Drawing(Pos); Pos--; } if(Pos==0) { // Mart[Pos]=iMA(NULL,0,6,0,MODE_LWMA,PRICE_TYPICAL,0); Mart[Pos]=iMA(NULL,0,6,0,MODE_LWMA,PRICE_CLOSE,0); Drawing(Pos); } return; } //---- double SnakePrice(int Shift) { // return((2*Close[shift]+High[shift]+Low[shift])/4); return(Close[shift]); } //---- double SnakeFirstCalc(int Shift) { int i, j, w; Snake_Sum=0.0; if(Shift<5) { Snake_Weight=0.0; i=0; w=Shift+5; while(w>=Shift) { i++; Snake_Sum=Snake_Sum+i*SnakePrice(w); Snake_Weight=Snake_Weight+i; w--; } while(w>=0) { i--; Snake_Sum=Snake_Sum+i*SnakePrice(w); Snake_Weight=Snake_Weight+i; w--; } } else { Snake_Sum_Minus=0.0; Snake_Sum_Plus=0.0; for(j=Shift-5,i=Shift+5,w=1; w<=5; j++,i--,w++) { Snake_Sum=Snake_Sum+w*(SnakePrice(i)+SnakePrice(j)); Snake_Sum_Minus=Snake_Sum_Minus+SnakePrice(i); Snake_Sum_Plus=Snake_Sum_Plus+SnakePrice(j); } Snake_Sum=Snake_Sum+6*SnakePrice(Shift); Snake_Sum_Minus=Snake_Sum_Minus+SnakePrice(Shift); Snake_Weight=36; } return(Snake_Sum/Snake_Weight); } //---- double SnakeNextCalc(int Shift) { Snake_Sum_Plus=Snake_Sum_Plus+SnakePrice(Shift-5); Snake_Sum=Snake_Sum-Snake_Sum_Minus+Snake_Sum_Plus; Snake_Sum_Minus=Snake_Sum_Minus-SnakePrice(Shift+6)+SnakePrice(Shift); Snake_Sum_Plus=Snake_Sum_Plus-SnakePrice(Shift); return(Snake_Sum/Snake_Weight); } //---- void Drawing(int Shift) { double val,Dval,val1,val2,val11,val22,val3; val= 5*(Mart[shift]-Mart[ArrayMinimum(Mart,cPeriod,Shift)])/9; Dval=5*(Mart[shift]- Mart[shift+1]+ Mart[ArrayMinimum(Mart,cPeriod,Shift+1)]- Mart[ArrayMinimum(Mart,cPeriod,Shift)] )/9; if(Dval>0) { ForceUp[shift]=val; ResistanceUp[shift]=0; } else { ForceUp[shift]=0; ResistanceUp[shift]=val; } val= 5*(Mart[shift]-Mart[ArrayMaximum(Mart,cPeriod,Shift)])/9; Dval=5*(Mart[shift]- Mart[shift+1]+ Mart[ArrayMaximum(Mart,cPeriod,Shift+1)]- Mart[ArrayMaximum(Mart,cPeriod,Shift)] )/9; if(Dval<0) { ForceDown[shift]=val; ResistanceDown[shift]=0; } else { ForceDown[shift]=0; ResistanceDown[shift]=val; } return; }
  2. I am attaching some screenshots and will try to post the code later. Thanks to Blu Ray and Tams. I really appreciate it.
  3. I have found an indicator Snake force for MT4. Will the people experienced in coding consider coding it for Tradestation. Thanks. Here is the cross reference. http://www.traderslaboratory.com/forums/f46/snake-force-6544.html#post72909 Here is the source: http://www.forex-tsd.com/suggestions-trading-systems/17578-snakebprders-pricechannel_stop_v1-2-indicators.html Mr[1]. Snake and The Wave.tpl SnakeForce.mq4
  4. I came across an indicator called Snakeforce combined with a snake channel. I also found a link to it on forex-tsd.com. This is an indicator for MT4. Can the smart programmers consider the possibility of converting it to a.ELD file. Thanks. Here are the links: http://www.forex-tsd.com/suggestions-trading-systems/17578-snakebprders-pricechannel_stop_v1-2-indicators.html SnakeForce.mq4 Mr. Snake and The Wave.tpl
  5. I did request the Tradestation support people to include this feature in their future versions. There is a poll to which we can vote on how useful or essential it might be. For TS users, please feel consider voting if you would like this feature since most other platforms offer it. There are however, third party TS add ons that complement TS with this feature.
  6. I found this post on "Re: Bid-Ask Pressure Indicator for Tradestation" interesting and have nominated it accordingly for "Topic Of The Month June, 2009"
  7. Thanks. However, I already do that now. I am more interested in having automatic bracketed orders that trigger automatically when I step away from the computer but available to move around manually when I am in front of the screen. Also a stop is very different from a mental stop which you suggested, since different trading psychology and discipline comes into play. I prefer hard stops to mental ones.
  8. I am interested in starting a new forum, Trading right off the chart because that is part of the strategy I would like to develop. I also saw another website offereing an indicator that might do that: http://www.customizedtrading.com/addons/s01 Is there anyone who might have some insight or suggestions? Thanks in advance.
  9. I think FXCM allows MT4 and has micro accounts. Forex Pro also has MT4 and allows hedging but I found out that they are based in Cyprus. Check out IBFX, which has MT4 and micro accounts but doesnt allow hedging.
  10. Blowfish, thanks for your post. How do you suggest using futures data as a proxy in the best manner, since you do not advise using upticks/downticks?
  11. Urmablume,what indicators are you using in the chart and do you have a code for those. Thanks. Interesting chart.
  12. I hope this indicator can be modified for Forex on Tradestation. Also please refer to the Waddah Attar indicator I posted for MT4 from another forum, which does similar things as this but works for forex on MT4. Any ideas from the expert programmers on this forum (Blu Ray, SoulTrader, Walter, Tams, Trade Samarai and many more) would be greatly appreciated. Many thanks in advance. http://www.traderslaboratory.com/forums/f46/waddah-attar-explosion-6168.html
  13. Here is the code: //+------------------------------------------------------------------+ //| Waddah_Attar_Explosion.mq4 | //| Copyright © 2006, Eng. Waddah Attar | //| waddahattar@hotmail.com | //+------------------------------------------------------------------+ #property copyright "Copyright © 2006, Eng. Waddah Attar" #property link "waddahattar@hotmail.com" //---- #property indicator_separate_window #property indicator_buffers 4 #property indicator_color1 Green #property indicator_color2 Red #property indicator_color3 Sienna #property indicator_color4 Blue #property indicator_minimum 0.0 //---- extern int Sensetive = 150; extern int DeadZonePip = 30; extern int ExplosionPower = 15; extern int TrendPower = 15; extern bool AlertWindow = true; extern int AlertCount = 500; extern bool AlertLong = true; extern bool AlertShort = true; extern bool AlertExitLong = true; extern bool AlertExitShort = true; //---- double ind_buffer1[]; double ind_buffer2[]; double ind_buffer3[]; double ind_buffer4[]; //---- int LastTime1 = 1; int LastTime2 = 1; int LastTime3 = 1; int LastTime4 = 1; int Status = 0, PrevStatus = -1; double bask, bbid; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int init() { SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 2); SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 2); SetIndexStyle(2, DRAW_LINE, STYLE_SOLID, 2); SetIndexStyle(3, DRAW_LINE, STYLE_DOT, 1); //---- SetIndexBuffer(0, ind_buffer1); SetIndexBuffer(1, ind_buffer2); SetIndexBuffer(2, ind_buffer3); SetIndexBuffer(3, ind_buffer4); //---- IndicatorShortName("Waddah Attar Explosion: [s(" + Sensetive + ") - DZ(" + DeadZonePip + ") - EP(" + ExplosionPower + ") - TP(" + TrendPower + ")]"); Comment("copyright waddahwttar@hotmail.com"); return(0); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int start() { double Trend1, Trend2, Explo1, Explo2, Dead; double pwrt, pwre; int limit, i, counted_bars = IndicatorCounted(); //---- if(counted_bars < 0) return(-1); //---- if(counted_bars > 0) counted_bars--; limit = Bars - counted_bars; //---- for(i = limit - 1; i >= 0; i--) { Trend1 = (iMACD(NULL, 0, 20, 40, 9, PRICE_CLOSE, MODE_MAIN, i) - iMACD(NULL, 0, 20, 40, 9, PRICE_CLOSE, MODE_MAIN, i + 1))*Sensetive; Trend2 = (iMACD(NULL, 0, 20, 40, 9, PRICE_CLOSE, MODE_MAIN, i + 2) - iMACD(NULL, 0, 20, 40, 9, PRICE_CLOSE, MODE_MAIN, i + 3))*Sensetive; Explo1 = (iBands(NULL, 0, 20, 2, 0, PRICE_CLOSE, MODE_UPPER, i) - iBands(NULL, 0, 20, 2, 0, PRICE_CLOSE, MODE_LOWER, i)); Explo2 = (iBands(NULL, 0, 20, 2, 0, PRICE_CLOSE, MODE_UPPER, i + 1) - iBands(NULL, 0, 20, 2, 0, PRICE_CLOSE, MODE_LOWER, i + 1)); Dead = Point * DeadZonePip; ind_buffer1 = 0; ind_buffer2 = 0; ind_buffer3 = 0; ind_buffer4 = 0; if(Trend1 >= 0) ind_buffer1 = Trend1; if(Trend1 < 0) ind_buffer2 = (-1*Trend1); ind_buffer3 = Explo1; ind_buffer4 = Dead; if(i == 0) { if(Trend1 > 0 && Trend1 > Explo1 && Trend1 > Dead && Explo1 > Dead && Explo1 > Explo2 && Trend1 > Trend2 && LastTime1 < AlertCount && AlertLong == true && Ask != bask) { pwrt = 100*(Trend1 - Trend2) / Trend1; pwre = 100*(Explo1 - Explo2) / Explo1; bask = Ask; if(pwre >= ExplosionPower && pwrt >= TrendPower) { if(AlertWindow == true) { Alert(LastTime1, "- ", Symbol(), " - BUY ", " (", DoubleToStr(bask, Digits) , ") Trend PWR " , DoubleToStr(pwrt,0), " - Exp PWR ", DoubleToStr(pwre, 0)); } else { Print(LastTime1, "- ", Symbol(), " - BUY ", " (", DoubleToStr(bask, Digits), ") Trend PWR ", DoubleToStr(pwrt, 0), " - Exp PWR ", DoubleToStr(pwre, 0)); } LastTime1++; } Status = 1; } if(Trend1 < 0 && MathAbs(Trend1) > Explo1 && MathAbs(Trend1) > Dead && Explo1 > Dead && Explo1 > Explo2 && MathAbs(Trend1) > MathAbs(Trend2) && LastTime2 < AlertCount && AlertShort == true && Bid != bbid) { pwrt = 100*(MathAbs(Trend1) - MathAbs(Trend2)) / MathAbs(Trend1); pwre = 100*(Explo1 - Explo2) / Explo1; bbid = Bid; if(pwre >= ExplosionPower && pwrt >= TrendPower) { if(AlertWindow == true) { Alert(LastTime2, "- ", Symbol(), " - SELL ", " (", DoubleToStr(bbid, Digits), ") Trend PWR ", DoubleToStr(pwrt,0), " - Exp PWR ", DoubleToStr(pwre, 0)); } else { Print(LastTime2, "- ", Symbol(), " - SELL ", " (", DoubleToStr(bbid, Digits), ") Trend PWR " , DoubleToStr(pwrt, 0), " - Exp PWR ", DoubleToStr(pwre, 0)); } LastTime2++; } Status = 2; } if(Trend1 > 0 && Trend1 < Explo1 && Trend1 < Trend2 && Trend2 > Explo2 && Trend1 > Dead && Explo1 > Dead && LastTime3 <= AlertCount && AlertExitLong == true && Bid != bbid) { bbid = Bid; if(AlertWindow == true) { Alert(LastTime3, "- ", Symbol(), " - Exit BUY ", " ", DoubleToStr(bbid, Digits)); } else { Print(LastTime3, "- ", Symbol(), " - Exit BUY ", " ", DoubleToStr(bbid, Digits)); } Status = 3; LastTime3++; } if(Trend1 < 0 && MathAbs(Trend1) < Explo1 && MathAbs(Trend1) < MathAbs(Trend2) && MathAbs(Trend2) > Explo2 && Trend1 > Dead && Explo1 > Dead && LastTime4 <= AlertCount && AlertExitShort == true && Ask != bask) { bask = Ask; if(AlertWindow == true) { Alert(LastTime4, "- ", Symbol(), " - Exit SELL ", " ", DoubleToStr(bask, Digits)); } else { Print(LastTime4, "- ", Symbol(), " - Exit SELL ", " ", DoubleToStr(bask, Digits)); } Status = 4; LastTime4++; } PrevStatus = Status; } if(Status != PrevStatus) { LastTime1 = 1; LastTime2 = 1; LastTime3 = 1; LastTime4 = 1; } } return(0); } //+------------------------------------------------------------------+
  14. Tams, Here is where I got it: Waddah Attar Explosion Indicator - Forex Trading
  15. I did post a new thread for Waddah Attar, on your recommendation. Thanks. http://www.traderslaboratory.com/forums/f46/waddah-attar-explosion-6168.html
  16. In another area, I posted an Indicator called Waddah Attar Explosion for Forex Buy Sell. Can someone look at the potential uses of it and try to code it forTradestation as an .ELD file. Thanks. Waddah_Attar_Explosion.mq4 Waddah_Attar_BUY_SELL_Vol_xtf.mq4
  17. Soultrader, Are the colored horizontal lines in the picture, Support/Resistance or Floor Trader Pivots? Nice chart and indicator!
  18. Actually it worked quite well. The green bars are decreasing. In the modified version of this, above, the decreasing bars would show up as red. Acknowledgement to Blu Ray: inputs: Period(20), UpColor(green), DownColor(red); variables: MyVol(0), Color(yellow), SmoothedBA(0), Length(squareroot(Period) ), intrabarpersist MyCurrentBar(0), intrabarpersist VolumeAtBid(0), intrabarpersist VolumeAtAsk(0), intrabarpersist BAVolRatio(0), intrabarpersist VolTmp(0); if LastBarOnChart and BarStatus(1) <> 2 then begin MyVol = Iff(BarType < 2, Ticks, Volume); if CurrentBar > MyCurrentBar then begin VolumeAtBid = 0; VolumeAtAsk = 0; BAVolRatio = 0; VolTmp = 0; MyCurrentBar = CurrentBar; end; if InsideBid < InsideAsk then begin if Close <= InsideBid then VolumeAtBid = VolumeAtBid + MyVol - VolTmp else if Close >= InsideAsk then VolumeAtAsk = VolumeAtAsk + MyVol - VolTmp ; end; if VolumeAtBid > 0 and VolumeAtAsk > 0 then BAVolRatio = Log( VolumeAtAsk / VolumeAtBid ); VolTmp = MyVol ; end ; SmoothedBA = xaverage(xaverage(BAvolra tio, Length), Length); if SmoothedBA <= SmoothedBA[1] then color = DownColor else color = UpColor; plot1(SmoothedBA, "Pressure", color); Plot2( 0, "ZeroLine" ) ;
  19. Is there programming code for this indicator? Thanks.
  20. I have been very impressed with all of your work on this indicator and how great it is in trading futures. However, I trade the forex mostly and wondered if there is a way to get the buy sell pressure on Forex. I do remember seeing an indicator on another forum called the Waddah Attar explosion. I can provide the code for the MT4 version. Q1> Can the Buy Pressure indicator be adapted to Forex? Q2. Can the Waddah Attar Explosion be coded for Tradestation for the same purpose? Thanks in advance. Waddah_Attar_Explosion.mq4
  21. I am interested in trading DAX and Eurostoxx50. Can someone give me suggestions on ticker symbols, times to trade, Tick and point size in Euros or $$, Average tru range, stop loss, reward/risk ratio, volatility, indicators suggested, brokers etc..?
  22. Hello, Does anyone have the .ELD or code for ADX Modified? Thanks in advance.
  23. I have some experience in this type of thing. When everyone is buying and the media flaunts it....it's time to get out!!! This is also a negative sum game with additional expenses for selling the property. In this game, someone is the winner, someone is the referee and someone is the fool. If you dont know who the fool is, guess what..you're it. India did this type of thing too and now property values are starting to decline from the "Irrational Exuberance" (a term coined by Mr. Greenspan in the past).
  24. Thanks for the OHLC. I am still getting several neutral bars but most have converted to red/green. Floor trader Pivots are available as an indicator on Tradestation, but I am more interested in rolling hourly pivots and support / resistance lines.
  25. Thanks Tams but that still does not solve my problem. I am not a programmer. Nor sure how the file you provided even is opened or used..
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.