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.

onesmith

Members
  • Content Count

    302
  • Joined

  • Last visited

Everything posted by onesmith

  1. This will plot text in the margin to the right. A lot of the code on the net uses calcdate and calctime to determine a date,time location in the future. This is a simplification that uses current date,time instead. Distance into the future is adjusted by the number of spaces between quotation marks in the SetString statement. It's best to start simple and increase complexity. To add text for an average, add id2 and set id2's string to use +numtostr(avg,2) and it's location to (id2,d,t,avg); Or (id2,d,t,avg+10) if you have a reason to adjust it 10 pts higher. var: id(0); once begin id=text_new(d,t,c," "); text_setstyle(id,0,2); end; text_setString(id," " +numtostr(c,2)); text_setLocation(id,d,t,c);
  2. Lyle, there's glaring inconsistentcies between your actions and what you say. That is my highly trained (I.E. experienced) observation (I.E. not opinion).
  3. I've never had and never will have any code, programming or consulting services forsale. I've never needed to sell the code I write. Nothing in my past or my future makes me a vendor or a coach. I despise that category of failed traders that feels it's necessary to fleece sheep to finance their trading losses.
  4. Steve46, Yesterday after seeing you called out (on a different topic) by a respected trader / valuable contributor, I wanted to know your history so I read all your posts. My conclusion was to put you on ignore for lack of content and consistently promoting paid tutoring. Your posts clutter the forum. Dilute content. Today I received notification of a new post but the forum indicated the post (by you) wasn't available because I had you on ignore. I removed the ignore because this topic had a previous insightful post (by someone other than you). That's why I am subscribed. I choose to honor my committments to myself. I prefer the subset of results I attain from a permanent ignore list.
  5. hey Tams,I have nothing forsale, never have and never will. What are your thoughts about these Day_Trading_Results? 9 out of 10 trades are winners.
  6. Are these Day_Trading_Results your real trading results or the hypothetical results of an over-optimized backtest? Do you offer any services to traders that requires paying you a fee? Is there anything else in the form of disclosure that would be helpful to have up front.
  7. The "we" in my note is a reference to everyone who writes automated strategies ... everywhere. So yes that includes you. It not only permissions your passage through that logic gate but demands it and leaves you no other open gates other than the logic that exists after you acknowledge we (including you) already know you don't value your strategy.
  8. This survey is an inappropriate solicitation. I was spammed with an email notification of it's existence because I automate strategies and chose to subscribe to the Automated Trading subsection of this forum. Here's how I score our moderator's choice to leave this topic up. + Eyeballs viewing this spam contribute to revenue while spam remains. - Sincere topics and replies vanish because I choose quality.
  9. The formula for slope is slope=(endprice-startprice)/length; A threshold can be optimized to filter out undesirable slope levels. input: threshold(.1); var: avg(0), slope(0); avg=average(c,10); slope=(avg-avg[10])/10; if slope > threshold then setplotcolor(1,green) else if slope < -threshold then setplotcolor(1,red); plot1(avg,"avg");
  10. The code you posted is not the code that produced the chart you posted. When asking for help it is best if your chart includes the symbol name in the picture. The symbol should be set to exchange time. This enables calibrating a test case to the aproximately 14:30 time (on this unknown symbol) using some code other than the code you posted.
  11. Just so we're clear on this last point, I understand your logic. It's good but it's wrong. I could refute it but I choose not to.
  12. It is better for me to withdraw at this point, after you've posted a reasonable refutation, that is quite eloquent btw, but does not disuade me from my own truth. Wiithdrawl is better for me, than pursuing where this would go from here.
  13. If you're interested in comments and suggestions then posting an open source text of the code will probably be necessary to create interest in it. We're already aware you have a low opinion of your strategy, because it would be unreasonable to have posted pictures of it's signals if you valued it. Given the info posted so far, I could write code that parallels it's signals. It's more time than it's worth to me, but for others such as yourself, although you already know your own code, this is probably the best way to learn. If I'm mistaken, and your not interested in hearing comments about your strategies strengths and weaknesses, or learning how to improve it, .. then your attempting to create a public record of it's results?
  14. Price based indicators compare price to price_trend, (not price to price). I'm not aware of anything offering a more optimal divergence signal than divergence from trend.
  15. bob, Divergence works (even when based solely on price) because a typical indicator measures trend. Thus divergence indicates price isn't trending as strongly as it was and price is approaching a reversal.
  16. Detrending calibrates a trend to zero on a horizontal axis. detrended_price = price minus it's average_price. This is the basis for many of the indicators based solely on price. Divergence from price based indicators is a statiscally valid measurement of change in trend.
  17. Within the range of data you're trying to plot, one of the calculations within your strategy is trying to return both an extremely small and extremely large value (if indeed you're certain you're not dividing by 0). If your code is well written, conscise, then experiment with replacing segments of complex calculations with whole numbers. For instance instead of value1=myLongFormula use value1=smallPortionOf_myLongFormula, or if necessary take it all the way to value1=1; But that's the advanced debugging, before that you should try simply commenting out code until you find the likely target.
  18. // CrossPrice is set to H of bar when FastAvg crosses above SlowAvg. // PreviousPrice stores most recent EntryPrice. // if mp=0 then NextPrice is CrossPrice+atr. // if mp=1 then NextPrice is PreviousPrice+atr. var: fast(0), slow(0), atr(0), cs(0), crossPrice(0), previousPrice(0), nextPrice(0); fast=average(c,10); slow=average(c,100); atr=AvgTrueRange(20); cs=currentshares; if fast>slow then begin if fast crosses above slow then begin crossPrice=H; nextPrice=crossPrice+atr; end; if cs>0 then begin if cs>cs[1] then previousPrice=maxlist(open,nextPrice); nextPrice=previousPrice+atr; end else nextPrice=crossPrice+atr; if crossPrice>0 then buy next bar nextPrice stop; end else sell next bar market;
  19. SetExitOnClose; works for backtesting purposes but doesn't work in realtime. Realtime requires the code below. Replace 1450 with the appropriate time of your choosing while keeping in mind a missing bar will prevent exit if your choice doesn't allow enough time for that possibility. if t>=1450 then begin sell next bar market; buytocover next bar market; end;
  20. onesmith

    Statistics

    Maybe I will code it. Do you know exactly what you want? Can you describe it clearly, without leaving out any details?
  21. var: tic(minmove/pricescale); sell next bar lowest(L,10)-tic stop; buytocover next bar highest(H,10)+tic stop;
  22. percentage=iff(ma1-ma2<>0,ma1/(ma1-ma2),0);
  23. var: x(0), mp(0), cs(0), np(0), step(2); mp=marketposition; cs=currentshares; np=entryprice+cs*step; if mp=0 and d=1111102 then buy next bar market; if mp>0 then buy next bar np stop; if cs<>cs[1] then begin x=text_new(d,t,np,"next="+numtostr(np,2)); text_setstyle(x,1,2); end;
  24. // dynamically adjusts text to upper left corner of chart var: id(text_new(d,t,c,"hello world")), x(text_setstyle(id,0,0)), intrabarpersist xd(0), intrabarpersist xt(0), intrabarpersist xp(0); xd=juliantodate(intPortion(getappinfo(aiLeftDispDateTime))); xt=minutesToTime(fracportion(getappinfo(aiLeftDispDateTime))*24*60); xp=getappinfo(aiHighestDispValue); text_setlocation(id,xd,xt,xp);
  25. var: intrabarpersist done(false); if c>H[1] then done=true; // edited to enable multiple_intrabar_states if barstatus(1)=2 then done=false;
×
×
  • Create New...

Important Information

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