Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/30/2009(UTC) Posts: 46 Location: Hawaii, US
|
Hi! I'm using daily (ohlcv) data from yahoo for my testing in EST, and it is making stops difficult to tune - if a stop is triggered, the price used is the open of the following day. Is the problem that MS will not accept defining of a trade price via the buy sell rules? There's a little to the contrary in the forums or manual, but not much. I try to define a trade price below, but the position trades show the result is just a yes or no to exiting at the next open.
Long exit: entry:=ValueWhen(1,Simulation.CurrentPositionAge=0,open); if(L<entry*(1-opt4),entry*(1-opt4), if(RSI(23)>45.67,open,0));
Thanks :)
EDIT - Well, the max loss under the stops tab is doing what I want, the manual said it was based on total equity, but it appears to be working off the entry amount. Would like to work on ATR and other stops though, so any info on specifying a trade price other still appreciated.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/30/2009(UTC) Posts: 46 Location: Hawaii, US
|
Well, for anyone searching on the subject, if using daily OHLCV data the only good stop method I've been able to test is the max loss stop in the stop tab. The trailing stop gave me incorrect results and methods like the above didn't specify the trade price, they just told MS to enter at the next open (or close, depending how the test was set up). Best of luck to all :)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Try replacing the entry line with:
entry:=extfml("forum.ref",open,simulation.currentpositionage);
You'll need the forum.dll if you havent already got it; see the files section.
wabbit [:D]
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/30/2009(UTC) Posts: 46 Location: Hawaii, US
|
Thanks Wabbit, the entry part was working ok, the problem is the second line doesn't make MS use that price, it is just evaluated as a yes or no to exit next open. I think some kind of system recognizable statement is needed, like "simulation.currentpositionexitprice" or something..
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.