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
High to low stock pattern for the close price

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
QuantShare Trading Software: New Features in the 3.3.1 Version
Presentation of QuantShare's new Real Time Version
9 mistakes you should avoid when backtesting an end-of-day stock ...
Trading software new features









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 © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.