molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Sat Jun 15, 2024 3:10 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Trial Day 3: Fixed Price Level for All Trade Execution
PostPosted: Fri Nov 25, 2011 5:18 pm 
Offline

Joined: Fri Nov 18, 2011 9:31 pm
Posts: 31
Hello Molanis,

I need a way to execute a trade based on the trade logic in the EA, and then use that same price level for all other subsequent trade executions until the EA's shut down time, which is set under the Time Block.

The EA already launched the first trade, based on the Time Block Starting Time. But, I need to re-use that same price level throughout the entire EA operating time parameters (set under the Start Block). So, all subsequent trades will have different execution times, but they will all have the exact same execution price level, +/- slippage and the spread, of course.

MTVar, does not allow me to do this. I can enter a Variable Name, but that has nothing to do with a specific price level and the only option for Variable Type is "Number" - which again is fixed by the software.

MQL, might be of some help, but it is impossible for me to figure out how to create the code necessary to produce a value that is equal to the entry price of the first trade.

And, to boil it all down for you, that is essentially what I need for the TA Block to work. I simply need to be able to say: If (Ask moves below Entry Price Level of First Trade), then Sell. If (Bid moves above Entry Price Level of First Trade), then Buy.

The key price level is determined by the very first trade the EA makes - after that, all other trades that get executed must be at that same price level (Entry Price of the First Trade). Or, said another way, all subsequent trades must be executed at the Close Price of the Bar, where the First Trade was Executed.

How do I accomplish this in Molanis?

Thank you.

Regards,
Horizontal


Top
 Profile  
 
 Post subject: Re: Trial Day 3: Fixed Price Level for All Trade Execution
PostPosted: Fri Nov 25, 2011 5:25 pm 
Offline

Joined: Fri Nov 18, 2011 9:31 pm
Posts: 31
In other words, how do I get Molanis to simply execute all future trades (after the first one) at the value of some past Close Price at XXXX hrs GMT?

I hope that clears it up a bit.


Top
 Profile  
 
 Post subject: Re: Trial Day 3: Fixed Price Level for All Trade Execution
PostPosted: Fri Nov 25, 2011 6:18 pm 
Offline
Site Admin

Joined: Fri Oct 16, 2009 3:40 pm
Posts: 451
You cannot do it with version 3.15 - Probably version 3.16 to be released next year (do not have a date yet) will have a function to get the execution price of the last order. I understand why people want the execution to use in the next trade - but not in all trades


Top
 Profile  
 
 Post subject: Re: Trial Day 3: Fixed Price Level for All Trade Execution
PostPosted: Fri Nov 25, 2011 7:53 pm 
Offline

Joined: Fri Nov 18, 2011 9:31 pm
Posts: 31
It is the price level of the first signaled order that matters the most for all subsequent orders to come.

We have to have differentials in the way we trade. That's part of what makes a market viable.

Thanks for the info on 3.16, but this kills one of the reasons why I would use Molanis, for an entire year. Still, I understand that you cannot evolve the product overnight. Traders that come up with creative trading ideas, will assist you in improving your product.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009