Click here to Login





                                                   saving value in trading machine simulator

  0

0
Avy Strominger
2016-09-18 11:07:51


Hello,
I would like to issue a buy when the close value of the current bar is higher than the high value of the bar when two SMA crossed.
The close value can be several bars after the cross. How sould I write this in the simulator?
Thanks.
Avy



QuantShare
2016-09-20 07:55:20

  0

Hi Avy,

You should write this:

c = cross(sma(10), sma(20));
buy = close > valuewhen(c, high);



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
Random Value for Each Trading Bar
Indicator/Price Value on a Specific Trading Date
Rebalance & Combine & backtest two trading strategies
Sharpe Ratio Ranking System to Lower Trading Strategies Volatilit...
Crossover/Convergence of Several Trading indicators

How-to Lessons
How to optimize an indicator in your trading system
How to optimize the stop limit of a trading system
How to add custom position-based metrics to your trading system
How to hide a trading indicator from a particular time frame
How to add a metric in the trading system simulation report

Related Forum Threads
Simulator Trading System Report
Trading System Simulator reports into future
Access the equity value of the portfolio from the simulator
Trading system optimization using the QuantShare API Simulator
Advice on building a trading simulator strategy

Blog Posts
3 ways to rank stocks in a trading system - Simulator and Potfoli...
Backtesting Your Trading Systems: Symbol Segmentation
How to Switch On/Off Trading Rules in Your Stock Trading System
Trading Forex with the commitments of traders report
Improve your trading system performance by ranking stocks









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.