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 Sun May 12, 2024 6:10 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 11 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: No Trade! Only one buy!
PostPosted: Tue Jul 10, 2012 12:24 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
Here is the crux of the problem. All 6 modes (0 thru 5) of your indicator are permanently stuck at a value of either 0 or 2147483647 (empty) and never change. Kinda hard to build conditions, heh? Between all the variables, empty values, and conditions in this indi's code; I can't figure out why. Frankly, I have no idea how it draws lines at all.

Sooooo... I looked for a workaround. In the existing code the alert variables default to false, which translates to a value of 0 in MT4. When a signal triggers they change to true, or 1 in MT4. I verifed this via temporarily adding print commands to the code. So I copied the 2 alert variables (basically, buy and sell) from the code and added them as 2 new indicator modes (6 and 7, respectively). They are basically ghost modes.

Ideally :? ... Mode 6 = 1, then BUY; Mode 7 = 1, then SELL. I'm well beyond my capabilities here, so I'll be almost as happy as you if this works.


Attachments:
TREND 1.mq4 [6.5 KiB]
Downloaded 337 times

_________________
I'm not a programmer, but I play one on TV.
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page Previous  1, 2

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