Click here to Login





                                                   AI Optimizer: Plays a sound when it finds a new fitness high

  0

0
QuantShare
2012-06-28 11:13:35


Here is a script that was sent to me by a QuantShare user. It plays a sound each time the PBIL or Genetic Algorithm optimizer finds a new fitness high.
The script must be placed as a fitness formula in your optimizer.


Fitness = AnnualReturn; // Type your fitness formula here
String soundfile = "e:\\_Quantshare\\Sounds\\new fitness high found.wav";

if (!Global.ContainsVariable("max_Fitness"))
{Global.SetVariable("max_Fitness", (double)Double.NegativeInfinity);};
if (Fitness > (double)Global.GetVariable("max_Fitness"))
{
System.Media.SoundPlayer new_fitness_high = new System.Media.SoundPlayer(soundfile);
new_fitness_high.Play();
Global.SetVariable("max_Fitness", Fitness);
Global.Trace("New Fitness High " + Math.Round(Fitness, 2).ToString() + " in Generation " + (OptimizerMetrics.Generation + 1).ToString());
}



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Number of Stocks Making a new 52-Week High - Market Indicator
New High
Cumulative New High/Low Line
Dave's New System - DNS
NYSE, AMEX and NASDAQ 52-week high and low data

How-to Lessons
How to download new quotes when selecting a chart
How to screen for stocks having a high correlation with the Dow J...
How to automatically draw Fibonacci Retracement for each new stoc...
How to speed up watchlist and screener plug-ins when working with...
How to change volume bar colors when the price closes down

Related Forum Threads
New to Quantshare. Futures quotes/data not automatically updatin...
trend line stick to high and low
System to alert whenever any stock reaches a 52 week high or low?
Custom Multi-Dimensional Fitness Formula (CMDFF) for Optimizer
charting issue with new version 2.91

Blog Posts
How to filter quotes data from high and low price spikes
9 mistakes you should avoid when backtesting an end-of-day stock ...
What's new in this trading software?
Trading software new features
New Ranking and Percentile Composite Functions









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2012 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items