From the example of EasyLanguage tutorial, if I want to place certain shares in a order"
I will write:
Buy 2 Shares Next Bar At Market;
(Buy 2 shares at Market price on open of next bar)
What if I am trying to place $1000 dollar fixed amount of money per trade.
How do I do it?
Buy $1000 Next Bar at Market; ?
Can anyone share how you do it?
is it possible to place fixed dollar amount of order?
- Dave Masalov
- Posts: 1712
- Joined: 16 Apr 2010
- Has thanked: 51 times
- Been thanked: 489 times
Re: is it possible to place fixed dollar amount of order?
Dear justmake,
You can specify in the code only the number of contracts to buy. If you want to set dollars per trade value, you can do this in Strategy Properties --> Properties or you can calculate the number of contracts that should be bought for needed amount of money: i.e. divide the dollars per trade value by the current price in the code.
You can specify in the code only the number of contracts to buy. If you want to set dollars per trade value, you can do this in Strategy Properties --> Properties or you can calculate the number of contracts that should be bought for needed amount of money: i.e. divide the dollars per trade value by the current price in the code.
Re: is it possible to place fixed dollar amount of order?
Hi,From the example of EasyLanguage tutorial, if I want to place certain shares in a order"
I will write:
Buy 2 Shares Next Bar At Market;
(Buy 2 shares at Market price on open of next bar)
What if I am trying to place $1000 dollar fixed amount of money per trade.
How do I do it?
Buy $1000 Next Bar at Market; ?
Can anyone share how you do it?
You could try
Code: Select all
Inputs:Amount$(1000);
Vars:Amount(0);
Amount=Amount$/close;
Buy next bar Amount shares at Market;