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
|