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
Trading rules using the VIX Index
Transform any order into a limit order selectively based on a tra...

How-to Lessons
How to optimize an indicator in your trading system
How to optimize the stop limit of a trading system
How to copy a trading item
How to detect stocks trading near all time highs
How to optimize the number of positions in a trading system

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...
Money Management: Optimize a trading system
Charting, Backtesting and Trading using Fundamental Data
How to create a trading system, screen and composite using earnin...
10 masks to create thousands of rules to use into your trading sy...









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.